Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix repr highlighter #1920

Merged
merged 5 commits into from Feb 11, 2022
Merged

Commits on Feb 5, 2022

  1. Add support for enum.Flag in ReprHighlighter

    enum.Flag allows more than one bit to be set, and its repr will show
    something like <Permission.READ|WRITE: 3>.
    
    For this to display correctly, we need to add the pipe symbol to the
    tag regex.
    brakhane committed Feb 5, 2022
    Copy the full SHA
    eb6b5ef View commit details
    Browse the repository at this point in the history
  2. Cleanup regex

    Special characters lose their special meaning in character sets, so
    there's no need to escape them with a backslash. Furthermore,
    some backslash escaped characters have no special meaning,
    so the backslash can be removed as well.
    
    "]" does normally close a set, except when it's the first character.
    Similarly, "-" has no special meaning at the beginning or the end.
    Therefore, the order in a few character sets had to be slightly
    modified.
    
    Just to be sure, the old and new versions of the regexp were confirmed
    to be equivalent via re.compile with the re.DEBUG flag and comparing the
    output.
    brakhane committed Feb 5, 2022
    Copy the full SHA
    68d3dfc View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    eec7110 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2022

  1. Add link to PR

    brakhane committed Feb 8, 2022
    Copy the full SHA
    ba0262b View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2022

  1. Copy the full SHA
    099893e View commit details
    Browse the repository at this point in the history