summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2008-03-15 10:02:39 +0100
committergbrandl <devnull@localhost>2008-03-15 10:02:39 +0100
commit6966ef80780de69f67162cee570d3de25543db43 (patch)
tree50da82064d49a8b9c725d5163e43f17f27cf8d62
parent929d05e5277b1993c87e7a890f0021d3bcd97bfd (diff)
downloadpygments-6966ef80780de69f67162cee570d3de25543db43.tar.gz
Fix directive name regex.
-rw-r--r--pygments/lexers/text.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py
index f4c5a1ba..869dad85 100644
--- a/pygments/lexers/text.py
+++ b/pygments/lexers/text.py
@@ -601,7 +601,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, Keyword)),
# A reference target
(r'^( *\.\.)(\s*)([\w\t ]+:)(.*?)$',