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

CodeRay's coderay_bold_every can't be set to false #95

Closed
simonvanderveldt opened this issue Nov 15, 2013 · 2 comments
Closed

CodeRay's coderay_bold_every can't be set to false #95

simonvanderveldt opened this issue Nov 15, 2013 · 2 comments
Assignees

Comments

@simonvanderveldt
Copy link

Coderay's coderay_bold_every can be set to false or to an integer, see CodeRay's numbering.rb (line 35).

But because the type is set to Integer in kramdown's options.rb (line 326) it's not possible to set it to false.

@simonvanderveldt
Copy link
Author

Changing the integer in the define in kramdown's options.rb to an Object makes it work

define(:coderay_bold_every, Object, 10, <<EOF) do |val|
Defines how often a line number should be made bold

Default: 10
Used by: HTML converter
EOF
    val
end

This obviously uses a block that doesn't do any validation. I'm not fully proficient in Ruby, so I don't really know which kind of validation one should do.
I guess a check on val == false and Integer === val should be enough?

@ghost ghost assigned gettalong Nov 16, 2013
@gettalong
Copy link
Owner

Thanks! I have updated the option to also allow false as value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants