[Fencommits] fenserve: escape notetaker markup characters where necessary in export

Benja Fallenstein benja.fallenstein at gmail.com
Tue May 1 19:17:07 EEST 2007


Tue May  1 19:17:00 EEST 2007  Benja Fallenstein <benja.fallenstein at gmail.com>
  * escape notetaker markup characters where necessary in export
diff -rN -u old-fenserve/notetaker/Main.hs new-fenserve/notetaker/Main.hs
--- old-fenserve/notetaker/Main.hs	2007-05-01 19:17:06.000000000 +0300
+++ new-fenserve/notetaker/Main.hs	2007-05-01 19:17:06.000000000 +0300
@@ -212,7 +212,8 @@
     h ('<':'/':'i':'>':cs) ls = "*" ++ h cs ls
     h ('<':'a':' ':'h':'r':'e':'f':'=':sep:cs) ls = "[" ++ link sep "" cs ls
     h ('<':'/':'a':'>':cs) ls = "]" ++ h cs ls
-    h (c:cs) ls = c : h cs ls
+    h (c:cs) ls | c `elem` "*[]_`\\|" = '\\' : c : h cs ls
+                | otherwise          =        c : h cs ls
     h "" (l:ls) = " | " ++ l ++ h "" ls
     h "" [] = ""
     




More information about the Fencommits mailing list