]> granicus.if.org Git - mutt/commitdiff
Add ascii-replacements for 0x2dc (tilde) and 0x2026 (...) too.
authorRocco Rutte <pdmef@gmx.net>
Thu, 29 Nov 2007 15:03:47 +0000 (16:03 +0100)
committerRocco Rutte <pdmef@gmx.net>
Thu, 29 Nov 2007 15:03:47 +0000 (16:03 +0100)
The manual cannot be clean us-acii but now we should have at least latin1

ChangeLog
doc/db-cleanup.xsl

index 20cb89960fc9756092f31cf61fb9b2fded69a590..ef104599612fa988414c39b96b1606c3818615c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2007-11-29 15:24 +0100  Rocco Rutte  <pdmef@gmx.net>  (c64cb80a90a6)
+
+       * doc/Makefile.am, doc/db-cleanup.xsl: Add a really ugly hack to make
+       sure the plain text manual is us-ascii. The hack is filtering
+       manual.html to another HTML file but replacing unicode chars by
+       their ascii equivalents. The intermediate file is used to dump HTML
+       to us-ascii text (and only for that).
+
+2007-11-29 10:18 +0100  Rocco Rutte  <pdmef@gmx.net>  (33895288520e)
+
+       * ChangeLog, hcache.c: Fix hcache build issue when building with gdbm
+       if qdbm is installed, too
+
 2007-11-21 13:19 +0100  Miroslav Lichvar  <mlichvar@redhat.com>  (9286a76e79a2)
 
        * send.c: Don't ignore $from in batch send mode.
index d146a98e3470f91b09c541b0568dac3b112b0bbf..4b7692bf1049192e93b3a9f45e217a07cc7b3e52 100644 (file)
   <!-- fixup a single string: -->
   <!-- 1) replace all non-breaking spaces by ascii-spaces (0xA0) -->
   <!-- 2) replace all quotes by ascii quotes (0x201C and 0x201D) -->
+  <!-- 3) replace "fancy" tilde with real tilde (sic!) (0x2DC)   -->
+  <!-- 4) replace "horizontal ellipses" with 3 dots (0x2026)     -->
   <xsl:template name="fixup">
     <xsl:param name="str"/>
-    <xsl:value-of select="translate(translate(translate($str,'&#xA0;',' '),'&#x201C;','&#x22;'),'&#x201D;','&#x22;')"/>
+    <xsl:choose>
+      <xsl:when test="contains($str,'&#x2026;')">
+        <xsl:call-template name="fixup">
+          <xsl:with-param name="str"><xsl:value-of select="substring-before($str,'&#x2026;')"/></xsl:with-param>
+        </xsl:call-template>
+        <xsl:text>...</xsl:text>
+        <xsl:call-template name="fixup">
+          <xsl:with-param name="str"><xsl:value-of select="substring-after($str,'&#x2026;')"/></xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="translate(translate(translate(translate($str,'&#xA0;',' '),'&#x201C;','&#x22;'),'&#x201D;','&#x22;'),'&#x2DC;','~')"/>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
 
 </xsl:stylesheet>