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

handle symbols declared with %s #1031

Merged
merged 2 commits into from
Sep 5, 2023
Merged

handle symbols declared with %s #1031

merged 2 commits into from
Sep 5, 2023

Conversation

theo-squadracer
Copy link
Contributor

Close #1030

Symbols declared with %s[symbol] the same way :'symbol', the entire string is used as a symbol token.

@nobu
Copy link
Member

nobu commented Jul 25, 2023

Thank you for the report and the fix.
Please add a test like bellow to test/rdoc/test_rdoc_parser_ruby.rb too.

  def test_parse_percent_symbol
    content = '%s[foo bar]'
    util_parser content
    tk = @parser.get_tk
    assert_equal :on_symbol, tk[:kind]
    assert_equal content, tk[:text]
  end

@theo-squadracer
Copy link
Contributor Author

Done, I don't know if I should do anything else

@nobu nobu merged commit ed91c4b into ruby:master Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Symbol is modified when declared with %s
2 participants