ref: d6e2498f747d07d314f237213688746d18370515
parent: af16820a125c4224462ab833bbf84ce2abb59d22
author: Werner Lemberg <[email protected]>
date: Fri Mar 24 13:31:47 EST 2006
* 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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 <[email protected]>
--- a/include/freetype/ftstroke.h
+++ b/include/freetype/ftstroke.h
@@ -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_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:
--- a/src/tools/docmaker/sources.py
+++ b/src/tools/docmaker/sources.py
@@ -135,8 +135,8 @@
#
# 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
--- a/src/tools/docmaker/tohtml.py
+++ b/src/tools/docmaker/tohtml.py
@@ -200,12 +200,12 @@
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 @@
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 ):