Commit d6e2498f747d07d314f237213688746d18370515

Werner Lemberg 2006-03-24T18:31:47

* 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.

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&lsquo;\2&rsquo;\3',
+                           line )
 
-        return "<p>" + line + "</p>"
+        return para_header + line + para_footer
 
 
     def  make_html_code( self, lines ):