% has to be mapped to %% when producing sst.doc
authorEric S. Raymond <esr@thyrsus.com>
Fri, 15 Sep 2006 18:51:40 +0000 (18:51 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 15 Sep 2006 18:51:40 +0000 (18:51 +0000)
...otherwise printf does unhelpful things.

doc/makehelp.py

index 0a171f2cd5c1a032c31c9f48172cc8a91982d84d..5ff72f45f6f6ab5d055d5b2e91561247d5d03a6c 100755 (executable)
@@ -34,7 +34,7 @@ while True:
         if line.find(endmarker2) > -1:
             state = 0
     if state:
-        savetext += line
+        savetext += line.replace("%", "%%")
 
 # Remove the section titles
 savetext = re.sub("\n+.*\n*Mnemonic:\\s*", "\n********\n%% ", savetext)