diff options
-rw-r--r-- | pygments/lexers/text.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py index b7895038..3ba07da5 100644 --- a/pygments/lexers/text.py +++ b/pygments/lexers/text.py @@ -18,7 +18,7 @@ try: except NameError: from sets import Set as set -from pygments.lexer import Lexer, RegexLexer, bygroups, include +from pygments.lexer import Lexer, RegexLexer, bygroups, include, using, this from pygments.token import Punctuation, \ Text, Comment, Keyword, Name, String, Generic, Operator, Number @@ -351,7 +351,8 @@ class MoinWikiLexer(RegexLexer): (r'^#.*$', Comment), (r'(!)(\S+)', bygroups(Keyword, Text)), # Ignore-next # Titles - (r'^(=+[^=]+=+)(\s*#.+)?$', bygroups(Generic.Heading, String)), + (r'^(=+)([^=]+)(=+)(\s*#.+)?$', + bygroups(Generic.Heading, using(this), Generic.Heading, String)), # Literal code blocks, with optional shebang (r'({{{)(\n#!.+)?', bygroups(Name.Builtin, Name.Namespace), 'codeblock'), (r'(\'\'\'?|\|\||`|__|~~|\^|,,|::)', Comment), # Formatting |