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

Allow underscore in highlighter language #5375

Merged
merged 1 commit into from Sep 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/jekyll/tags/highlight.rb
Expand Up @@ -8,7 +8,7 @@ class HighlightBlock < Liquid::Block
# forms: name, name=value, or name="<quoted list>"
#
# <quoted list> is a space-separated list of numbers
SYNTAX = %r!^([a-zA-Z0-9.+#-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$!
SYNTAX = %r!^([a-zA-Z0-9.+#_-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$!

def initialize(tag_name, markup, tokens)
super
Expand Down
1 change: 1 addition & 0 deletions test/test_tags.rb
Expand Up @@ -59,6 +59,7 @@ def highlight_block_with_opts(options_string)
assert_match r, "xml+cheetah"
assert_match r, "x.y"
assert_match r, "coffee-script"
assert_match r, "shell_session"

refute_match r, "blah^"

Expand Down