freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master e5a27a7 1/2: [docmaker] Allow `-' in bold and italic


From: Werner LEMBERG
Subject: [freetype2] master e5a27a7 1/2: [docmaker] Allow `-' in bold and italic markup.
Date: Thu, 10 Sep 2015 05:47:05 +0000

branch: master
commit e5a27a7596684eea63190d51551165eea5d20717
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [docmaker] Allow `-' in bold and italic markup.
    
    * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
    accordingly.
---
 ChangeLog                     |    7 +++++++
 src/tools/docmaker/sources.py |    7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8071971..73a7a41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-09-10  Werner Lemberg  <address@hidden>
+
+       [docmaker] Allow `-' in bold and italic markup.
+
+       * src/tools/docmaker/sources.py (re_italic, re_bold): Adjust
+       accordingly.
+
 2015-09-09  Alexei Podtelezhnikov  <address@hidden>
 
        * src/base/ftcalc.c (FT_RoundFix): Improve.
diff --git a/src/tools/docmaker/sources.py b/src/tools/docmaker/sources.py
index 0cf21ce..be38132 100644
--- a/src/tools/docmaker/sources.py
+++ b/src/tools/docmaker/sources.py
@@ -150,10 +150,11 @@ re_crossref = re.compile( r'@((?:\w|-)*)(.*)' )    #  @foo
 # 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]