forked from minhngoc25a/freetype2
* src/tools/docmaker/tohtml.py (make_html_para): Convert `...' quotations
into real left and right single quotes. Use `para_header' and `para_footer'. * src/tools/docmaker/sources.py (re_bold, re_italic): Accept "'" also.
This commit is contained in:
parent
af16820a12
commit
d6e2498f74
|
@ -2,9 +2,16 @@
|
|||
|
||||
* docs/CHANGES: Updated.
|
||||
|
||||
|
||||
* src/tools/docmaker/tohtml.py (html_header_2): Add horizontal
|
||||
padding between table elements.
|
||||
(html_header_1): The `DOCTYPE' comment must be in uppercase.
|
||||
(make_html_para): Convert `...' quotations into real left and
|
||||
right single quotes.
|
||||
Use `para_header' and `para_footer'.
|
||||
|
||||
* src/tools/docmaker/sources.py (re_bold, re_italic): Accept "'"
|
||||
also.
|
||||
|
||||
2006-03-23 David Turner <david@freetype.org>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* FreeType path stroker (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2005 by */
|
||||
/* Copyright 2002, 2003, 2004, 2005, 2006 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -406,7 +406,7 @@ FT_BEGIN_HEADER
|
|||
* FT_Stroker_ConicTo
|
||||
*
|
||||
* @description:
|
||||
* `Draw; a single quadratic bezier in the stroker's current sub-path,
|
||||
* `Draw' a single quadratic bezier in the stroker's current sub-path,
|
||||
* from the last position.
|
||||
*
|
||||
* @input:
|
||||
|
|
|
@ -135,8 +135,8 @@ re_crossref = re.compile( r'@(\w*)(.*)' )
|
|||
#
|
||||
# used to detect italic and bold styles in paragraph text
|
||||
#
|
||||
re_italic = re.compile( r'_(\w+)_' )
|
||||
re_bold = re.compile( r'\*(\w+)\*' )
|
||||
re_italic = re.compile( r"_(\w(\w|')*)_" )
|
||||
re_bold = re.compile( r"\*(\w(\w|')*)\*" )
|
||||
|
||||
#
|
||||
# used to detect the end of commented source lines
|
||||
|
|
|
@ -200,12 +200,12 @@ class HtmlFormatter(Formatter):
|
|||
m = re_italic.match( word )
|
||||
if m:
|
||||
name = m.group(1)
|
||||
return '<i>'+name+'</i>'
|
||||
return '<i>' + name + '</i>'
|
||||
|
||||
m = re_bold.match( word )
|
||||
if m:
|
||||
name = m.group(1)
|
||||
return '<b>'+name+'</b>'
|
||||
return '<b>' + name + '</b>'
|
||||
|
||||
return html_quote(word)
|
||||
|
||||
|
@ -217,8 +217,12 @@ class HtmlFormatter(Formatter):
|
|||
line = self.make_html_word( words[0] )
|
||||
for word in words[1:]:
|
||||
line = line + " " + self.make_html_word( word )
|
||||
# convert `...' quotations into real left and right single quotes
|
||||
line = re.sub( r"(^|\W)`(.*?)'(\W|$)",
|
||||
r'\1‘\2’\3',
|
||||
line )
|
||||
|
||||
return "<p>" + line + "</p>"
|
||||
return para_header + line + para_footer
|
||||
|
||||
|
||||
def make_html_code( self, lines ):
|
||||
|
|
Loading…
Reference in New Issue