* 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
diff --git a/ChangeLog b/ChangeLog
index d755a08..553dbe9 100644
--- 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 <david@freetype.org>
diff --git a/include/freetype/ftstroke.h b/include/freetype/ftstroke.h
index f4c14bd..83a1ed5 100644
--- 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_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:
diff --git a/src/tools/docmaker/sources.py b/src/tools/docmaker/sources.py
index 1928ae1..edc9f6c 100644
--- a/src/tools/docmaker/sources.py
+++ b/src/tools/docmaker/sources.py
@@ -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
diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py
index b10816b..813092a 100644
--- a/src/tools/docmaker/tohtml.py
+++ b/src/tools/docmaker/tohtml.py
@@ -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 ):