summaryrefslogtreecommitdiff
path: root/pygments/lexers/text.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-02-28 22:43:27 +0100
committerGeorg Brandl <georg@python.org>2010-02-28 22:43:27 +0100
commit79d584cfac8d201266e3e0c343743905d7f0616c (patch)
tree9f1577f19d39a0ec3fdd68d98fee5d6cbde52774 /pygments/lexers/text.py
parent3cf9ca698cdafa6383f763de294323118de0a27e (diff)
downloadpygments-79d584cfac8d201266e3e0c343743905d7f0616c.tar.gz
Fix test suite: there are problems with groups being None.
Diffstat (limited to 'pygments/lexers/text.py')
-rw-r--r--pygments/lexers/text.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py
index 8fd57bc5..2a361a95 100644
--- a/pygments/lexers/text.py
+++ b/pygments/lexers/text.py
@@ -663,7 +663,7 @@ class RstLexer(RegexLexer):
r'(\n[ \t]*\n)([ \t]+)(.*)(\n)((?:(?:\8.*|)\n)+)',
_handle_sourcecode),
# A directive
- (r'^( *\.\.)(\s*)([\w-]+)(::)(?:([ \t]*)(.+))?',
+ (r'^( *\.\.)(\s*)([\w-]+)(::)(?:([ \t]*)(.*))',
bygroups(Punctuation, Text, Operator.Word, Punctuation, Text,
using(this, state='inline'))),
# A reference target
@@ -673,7 +673,7 @@ class RstLexer(RegexLexer):
(r'^( *\.\.)(\s*)(\[.+\])(.*?)$',
bygroups(Punctuation, Text, Name.Tag, using(this, state='inline'))),
# A substitution def
- (r'^( *\.\.)(\s*)(\|.+\|)(\s*)([\w-]+)(::)(?:([ \t]*)(.+))$',
+ (r'^( *\.\.)(\s*)(\|.+\|)(\s*)([\w-]+)(::)(?:([ \t]*)(.*))',
bygroups(Punctuation, Text, Name.Tag, Text, Operator.Word,
Punctuation, Text, using(this, state='inline'))),
# Comments