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

CGI-style parameter set to false isn't recognised as false #1380

Closed
pyrmont opened this issue Dec 19, 2019 · 2 comments · Fixed by #1382
Closed

CGI-style parameter set to false isn't recognised as false #1380

pyrmont opened this issue Dec 19, 2019 · 2 comments · Fixed by #1382
Assignees
Labels
bugfix-request A request for a bugfix to be developed.

Comments

@pyrmont
Copy link
Contributor

pyrmont commented Dec 19, 2019

Describe the bug
When passing an option to a lexer as a CGI-style parameter, parameter=false does not result in parameter being set to false.

To Reproduce
Steps to reproduce the behavior:

  1. Specify the language string to a GFM code block as console?comments=false
  2. The resulting ConsoleLexer will have the option for comments enabled.

Expected behavior
The parameter value will be false.

System

  • Ruby 2.6.5
  • Rouge 3.14.0

Additional context
As discussed by @dleidert in #1379.

@pyrmont pyrmont added the bugfix-request A request for a bugfix to be developed. label Dec 19, 2019
@pyrmont pyrmont self-assigned this Dec 19, 2019
@jneen
Copy link
Member

jneen commented Dec 19, 2019

when nil, false, 0, '0', 'off'

lexer.rb, line 321 should do it :]

@pyrmont
Copy link
Contributor Author

pyrmont commented Dec 23, 2019

Aww yiss :)

Thanks @jneen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix-request A request for a bugfix to be developed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants