diff --git a/extra/farkup/farkup-tests.factor b/extra/farkup/farkup-tests.factor index 7176486f8e..4d235a054c 100755 --- a/extra/farkup/farkup-tests.factor +++ b/extra/farkup/farkup-tests.factor @@ -54,7 +54,7 @@ IN: farkup.tests [ "

=

foo

" ] [ "===foo==" convert-farkup ] unit-test [ "

foo

=

" ] [ "=foo==" convert-farkup ] unit-test -[ "
int main()
" ] +[ "
int main()\n
" ] [ "[c{int main()}]" convert-farkup ] unit-test [ "

" ] [ "[[image:lol.jpg]]" convert-farkup ] unit-test diff --git a/extra/farkup/farkup.factor b/extra/farkup/farkup.factor index 15b7b4b72c..860fdba3af 100755 --- a/extra/farkup/farkup.factor +++ b/extra/farkup/farkup.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: arrays io io.styles kernel memoize namespaces peg sequences strings html.elements xml.entities xmode.code2html -splitting io.streams.string html peg.parsers html.elements +splitting io.streams.string peg.parsers sequences.deep unicode.categories ; IN: farkup @@ -56,11 +56,9 @@ MEMO: eq ( -- parser ) : render-code ( string mode -- string' ) >r string-lines r> [ - [ - H{ { wrap-margin f } } [ - htmlize-lines - ] with-nesting - ] with-html-stream +
+            htmlize-lines
+        
] with-string-writer ; : check-url ( href -- href' ) diff --git a/extra/xmode/code2html/code2html.factor b/extra/xmode/code2html/code2html.factor index 3977f4277c..a9384ad861 100755 --- a/extra/xmode/code2html/code2html.factor +++ b/extra/xmode/code2html/code2html.factor @@ -1,12 +1,12 @@ USING: xmode.tokens xmode.marker xmode.catalog kernel html html.elements io io.files sequences words io.encodings.utf8 -namespaces ; +namespaces xml.entities ; IN: xmode.code2html : htmlize-tokens ( tokens -- ) [ dup token-str swap token-id [ - write + escape-string write ] [ write ] if* @@ -21,7 +21,7 @@ IN: xmode.code2html : default-stylesheet ( -- ) ; : htmlize-stream ( path stream -- ) @@ -29,7 +29,7 @@ IN: xmode.code2html default-stylesheet - dup write + dup escape-string write