]> gitweb.factorcode.org Git - factor.git/commitdiff
help.markup: tweak ($code) again
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 1 Feb 2023 23:21:04 +0000 (15:21 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 1 Feb 2023 23:21:04 +0000 (15:21 -0800)
basis/help/markup/markup-tests.factor
basis/help/markup/markup.factor

index 3491d3a5b6f001b4481f49cf8687477bf436a665..98afe959fd89945009a5351326665abd645706d4 100644 (file)
@@ -47,16 +47,16 @@ TUPLE: blahblah quux ;
 { "2 2 +\n\nspan" }
 [ [ { { $code "2 2 +" } "span" } print-content ] with-markup-test ] unit-test
 
-{ "2 2 +\n" }
+{ "2 2 +\n\n" }
 [ [ { { $code "2 2 +" } } print-content ] with-markup-test ] unit-test
 
-{ "span\n\n2 2 +\n" }
+{ "span\n2 2 +\n\n" }
 [ [ { "span" { $code "2 2 +" } } print-content ] with-markup-test ] unit-test
 
-{ "\n2 2 +\n" }
+{ "\n2 2 +\n\n" }
 [ [ { { $nl } { $code "2 2 +" } } print-content ] with-markup-test ] unit-test
 
-{ "span\n\n2 2 +\n" }
+{ "span\n\n2 2 +\n\n" }
 [ [ { "span" { $nl } { $code "2 2 +" } } print-content ] with-markup-test ] unit-test
 
 { "Heading" }
index 72a480e8f3a46be397b9e7d4a7e57270de4111dd..3c8ca8a5c0c502cb3ea8eb10257ef4777306caee 100644 (file)
@@ -95,8 +95,8 @@ M: f print-element drop ;
 : ($code) ( presentation quot -- )
     [
         last-element off
-        [ ($code-style) ] dip with-nesting nl
-    ] ($heading) ; inline
+        [ ($code-style) ] dip with-nesting
+    ] ($block) ($blank-line) ; inline
 
 : $code ( element -- )
     join-lines dup <input> [ write ] ($code) ;