mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-11-16 06:05:00 -05:00
Allow any non-whitespace character in language types for pygments code highlighting. Addresses #1166
This commit is contained in:
parent
f17e6cb15d
commit
269bc27acb
@ -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, ''
|
||||
|
Loading…
Reference in New Issue
Block a user