Permalink
Browse files

Fixed ampersand escaping (annoying because libxml2 handily unescapes …

…ampersand escape sequences whether you want it or not)
  • Loading branch information...
1 parent 1caca03 commit e43810dcc9fff23ab8266a510da31d0a0ff5292f @vsedach committed Sep 1, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/markup.lisp
View
@@ -36,9 +36,14 @@
(defun generate-html-from-markup (markup)
#H[<div id="article">]
- (princ (parse-cliki-markup
- (escape-parens-in-href-links
- (sanitize:clean markup +cliki-tags+)))
+ (princ (colorize-code
+ (ppcre:regex-replace-all
+ "\\n\\n"
+ (sanitize:clean
+ (parse-cliki-markup
+ (escape-parens-in-href-links markup))
+ +cliki-tags+)
+ "<p>"))
*html-stream*)
#H[</div>])
@@ -56,7 +61,7 @@
(loop for prefix in '("_" "_H" "\\*" "\\/" "_P")
for formatter in '(pprint-article-link format-hyperspec-link pprint-category-link format-category-list format-package-link)
do (setf markup (process-cliki-rule markup prefix formatter)))
- (ppcre:regex-replace-all "\\n\\n" (colorize-code markup) "<p>"))
+ markup)
(defun process-cliki-rule (markup prefix formatter)
(ppcre:regex-replace-all #?/${prefix}\((.*?)\)/

0 comments on commit e43810d

Please sign in to comment.