Commits

Anonymous committed 7a363aa Draft

Fix processing of README.

  • Participants
  • Parent commits 1e92f48

Comments (0)

Files changed (1)

         srcfile = open('readme.html', 'rw')
         destfile = open('readme_processed.html', 'a')
         for line in srcfile.readlines():
-                line = re.sub("<h2", "<h4", line)
-                line = re.sub("</h2>", "</h4>", line)
-                line = re.sub("<h1", "<h3", line)
-                line = re.sub("</h1>", "</h3>", line)
+                line = re.sub("<h2", "\n<i", line)
+                line = re.sub("</h2>", "</i>", line)
+                line = re.sub("<h1", "\n<b", line)
+                line = re.sub("</h1>", "</b>", line)
+                line = re.sub("<p>", "\n", line)
+                line = re.sub("</p>", "", line)
+                line = re.sub("<pre>", "<code>", line)
+                line = re.sub("</pre>", "</code>", line)
                 destfile.write(line)
         fabric.local('rm readme.html')