Skip to content

Commit

Permalink
Allow underscore in highlighter language
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicop06 committed Sep 19, 2016
1 parent 7a9427c commit 0b94cf3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jekyll/tags/highlight.rb
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 0b94cf3

Please sign in to comment.