* src/tools/docmaker/sources.py (re_bold, re_italic): Use
non-grouping parentheses. * src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word): Updated.
This commit is contained in:
parent
3d167cbe7f
commit
e8a5c33e9f
|
@ -1,3 +1,10 @@
|
|||
2014-11-27 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/tools/docmaker/sources.py (re_bold, re_italic): Use
|
||||
non-grouping parentheses.
|
||||
* src/tools/docmaker/tohtml.py (HtmlFormatter::make_html_word):
|
||||
Updated.
|
||||
|
||||
2014-11-27 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* src/base/ftobjs.c (FT_Get_Glyph_Name): Fix compiler warning.
|
||||
|
|
|
@ -147,13 +147,13 @@ re_crossref = re.compile( r'@((?:\w|-)*)(.*)' ) # @foo
|
|||
|
||||
#
|
||||
# Two regular expressions to detect italic and bold markup, respectively.
|
||||
# Group 1 is the markup, group 3 the rest of the line.
|
||||
# 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).
|
||||
#
|
||||
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
|
||||
|
|
|
@ -263,13 +263,13 @@ class HtmlFormatter( Formatter ):
|
|||
m = re_italic.match( word )
|
||||
if m:
|
||||
name = m.group( 1 )
|
||||
rest = m.group( 3 )
|
||||
rest = m.group( 2 )
|
||||
return '<i>' + name + '</i>' + rest
|
||||
|
||||
m = re_bold.match( word )
|
||||
if m:
|
||||
name = m.group( 1 )
|
||||
rest = m.group( 3 )
|
||||
rest = m.group( 2 )
|
||||
return '<b>' + name + '</b>' + rest
|
||||
|
||||
return html_quote( word )
|
||||
|
|
Loading…
Reference in New Issue