ref: e5a27a7596684eea63190d51551165eea5d20717
parent: 09948e426e95a486017913158a46ac570cc7a91a
author: Werner Lemberg <[email protected]>
date: Thu Sep 10 03:44:11 EDT 2015
[docmaker] Allow `-' in bold and italic markup. * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust accordingly.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-09-10 Werner Lemberg <[email protected]>
+
+ [docmaker] Allow `-' in bold and italic markup.
+
+ * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
+ accordingly.
+
2015-09-09 Alexei Podtelezhnikov <[email protected]>
* src/base/ftcalc.c (FT_RoundFix): Improve.
--- a/src/tools/docmaker/sources.py
+++ b/src/tools/docmaker/sources.py
@@ -150,10 +150,11 @@
# Group 1 is the markup, group 2 the rest of the line.
#
# Note that the markup is limited to words consisting of letters, digits,
-# the character `_', or an apostrophe (but not as the first character).
+# the characters `_' and `-', or an apostrophe (but not as the first
+# character).
#
-re_italic = re.compile( r"_(\w(?:\w|')*)_(.*)" ) # _italic_
-re_bold = re.compile( r"\*(\w(?:\w|')*)\*(.*)" ) # *bold*
+re_italic = re.compile( r"_((?:\w|-)(?:\w|'|-)*)_(.*)" ) # _italic_
+re_bold = re.compile( r"\*((?:\w|-)(?:\w|'|-)*)\*(.*)" ) # *bold*
#
# This regular expression code to identify an URL has been taken from