Allow any non-whitespace character in language types for pygments code highlighting. Addresses #1166

This commit is contained in:
Brandon Mathis 2013-04-09 09:20:45 -05:00
parent f17e6cb15d
commit 269bc27acb

View File

@ -114,7 +114,7 @@ module HighlightCode
end
def parse_markup (input)
lang = input.match(/\s*lang:(\w+)/i)
lang = input.match(/\s*lang:([\S+)/i)
title = input.match(/\s*title:\s*(("(.+?)")|('(.+?)')|(\S+))/i)
linenos = input.match(/\s*linenos:(\w+)/i)
escape = input.match(/\s*escape:(\w+)/i)
@ -139,7 +139,7 @@ module HighlightCode
end
def clean_markup (input)
input.sub(/\s*lang:\s*\w+/i, ''
input.sub(/\s*lang:\s*\S+/i, ''
).sub(/\s*title:\s*(("(.+?)")|('(.+?)')|(\S+))/i, ''
).sub(/\s*url:\s*(\S+)/i, ''
).sub(/\s*link_text:\s*(("(.+?)")|('(.+?)')|(\S+))/i, ''