Fix farkup tests
parent
cd0b715161
commit
dd42130aed
|
@ -54,7 +54,7 @@ IN: farkup.tests
|
||||||
[ "<p>=</p><h2>foo</h2>" ] [ "===foo==" convert-farkup ] unit-test
|
[ "<p>=</p><h2>foo</h2>" ] [ "===foo==" convert-farkup ] unit-test
|
||||||
[ "<h1>foo</h1><p>=</p>" ] [ "=foo==" convert-farkup ] unit-test
|
[ "<h1>foo</h1><p>=</p>" ] [ "=foo==" convert-farkup ] unit-test
|
||||||
|
|
||||||
[ "<span class='KEYWORD3'>int</span> <span class='FUNCTION'>main</span><span class='OPERATOR'>(</span><span class='OPERATOR'>)</span><br/>" ]
|
[ "<div style='white-space: pre; font-family: monospace; '><span class='KEYWORD3'>int</span> <span class='FUNCTION'>main</span><span class='OPERATOR'>(</span><span class='OPERATOR'>)</span><br/></div>" ]
|
||||||
[ "[c{int main()}]" convert-farkup ] unit-test
|
[ "[c{int main()}]" convert-farkup ] unit-test
|
||||||
|
|
||||||
[ "<p><img src=\"lol.jpg\"/></p>" ] [ "[[image:lol.jpg]]" convert-farkup ] unit-test
|
[ "<p><img src=\"lol.jpg\"/></p>" ] [ "[[image:lol.jpg]]" convert-farkup ] unit-test
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays io kernel memoize namespaces peg sequences strings
|
USING: arrays io io.styles kernel memoize namespaces peg
|
||||||
html.elements xml.entities xmode.code2html splitting
|
sequences strings html.elements xml.entities xmode.code2html
|
||||||
io.streams.string html peg.parsers html.elements sequences.deep
|
splitting io.streams.string html peg.parsers html.elements
|
||||||
unicode.categories ;
|
sequences.deep unicode.categories ;
|
||||||
IN: farkup
|
IN: farkup
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
@ -55,8 +55,13 @@ MEMO: eq ( -- parser )
|
||||||
|
|
||||||
: render-code ( string mode -- string' )
|
: render-code ( string mode -- string' )
|
||||||
>r string-lines r>
|
>r string-lines r>
|
||||||
[ [ htmlize-lines ] with-html-stream ] with-string-writer
|
[
|
||||||
"pre" surround-with-foo ;
|
[
|
||||||
|
H{ { wrap-margin f } } [
|
||||||
|
htmlize-lines
|
||||||
|
] with-nesting
|
||||||
|
] with-html-stream
|
||||||
|
] with-string-writer ;
|
||||||
|
|
||||||
: escape-link ( href text -- href-esc text-esc )
|
: escape-link ( href text -- href-esc text-esc )
|
||||||
>r escape-quoted-string r> escape-string ;
|
>r escape-quoted-string r> escape-string ;
|
||||||
|
|
Loading…
Reference in New Issue