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

Comments

Projects
None yet
2 participants
@simonvanderveldt

simonvanderveldt commented Nov 15, 2013

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

This comment has been minimized.

simonvanderveldt commented Nov 15, 2013

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

This comment has been minimized.

Owner

gettalong commented Nov 16, 2013

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

@gettalong gettalong closed this Nov 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment