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 NameError on @ + UPPERCASE token in Objective-C #1406

Merged
merged 2 commits into from Jan 25, 2020

Commits on Jan 24, 2020

  1. Fix NameError on @ + UPPERCASE token in Objective-C

    ```bash
    $ ruby -Ilib -rrouge -e 'p Rouge.highlight("@foo", "objective_c", "html")'
    Traceback (most recent call last):
            18: from -e:1:in `<main>'
            17: from /path/to/rouge/lib/rouge.rb:32:in `highlight'
            16: from /path/to/rouge/lib/rouge/formatter.rb:46:in `format'
            15: from /path/to/rouge/lib/rouge/formatter.rb:74:in `format'
            14: from /path/to/rouge/lib/rouge/formatters/html.rb:12:in `stream'
            13: from /path/to/rouge/lib/rouge/formatters/html.rb:12:in `each'
            12: from /path/to/rouge/lib/rouge/formatter.rb:58:in `filter_escapes'
            11: from /path/to/rouge/lib/rouge/formatter.rb:58:in `each'
            10: from /path/to/rouge/lib/rouge/lexer.rb:451:in `lex'
             9: from /path/to/rouge/lib/rouge/lexer.rb:461:in `continue_lex'
             8: from /path/to/rouge/lib/rouge/regex_lexer.rb:272:in `stream_tokens'
             7: from /path/to/rouge/lib/rouge/regex_lexer.rb:291:in `step'
             6: from /path/to/rouge/lib/rouge/regex_lexer.rb:291:in `each'
             5: from /path/to/rouge/lib/rouge/regex_lexer.rb:294:in `block in step'
             4: from /path/to/rouge/lib/rouge/regex_lexer.rb:291:in `step'
             3: from /path/to/rouge/lib/rouge/regex_lexer.rb:291:in `each'
             2: from /path/to/rouge/lib/rouge/regex_lexer.rb:309:in `block in step'
             1: from /path/to/rouge/lib/rouge/regex_lexer.rb:309:in `instance_exec'
    /path/to/rouge/lib/rouge/lexers/objective_c/common.rb:47:in `block (2 levels) in extended': uninitialized constant Rouge::Lexers::ObjectiveCCommon::Error (NameError)
    Did you mean?  IOError
                   Errno
    ```
    
    ```bash
    $ ruby -Ilib -rrouge -e 'p Rouge.highlight("@foo", "objective_c", "html")'
    "<span class=\"err\">@foo</span>"
    ```
    pocke committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    e2683e8 View commit details
    Browse the repository at this point in the history
  2. Add example to visual spec

    pyrmont committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    9147107 View commit details
    Browse the repository at this point in the history