]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix another XMode bug
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sun, 29 Mar 2009 03:19:55 +0000 (22:19 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sun, 29 Mar 2009 03:19:55 +0000 (22:19 -0500)
basis/xmode/code2html/code2html-tests.factor
basis/xmode/marker/marker.factor

index a35e6a2194c1229586de1dcacaad917cf3c9b686..8d5db4a6e9b613bbc26dc188a8489905db7dc771 100644 (file)
@@ -22,4 +22,8 @@ kernel io.streams.string xml.writer ;
 
 [ "<span class=\"MARKUP\">: foo</span> <span class=\"MARKUP\">;</span>" ] [
     { ": foo ;" } "factor" htmlize-lines xml>string
+] unit-test
+
+[ ":foo" ] [
+    { ":foo" } "factor" htmlize-lines xml>string
 ] unit-test
\ No newline at end of file
index 98b4f91f86541ca0411f170edb40a33afc8f53b0..b4c1cd6a48dfaf50410a75d1da25adbb5275171e 100755 (executable)
@@ -84,7 +84,7 @@ M: string-matcher text-matches?
     ] keep string>> length and ;
 
 M: regexp text-matches?
-    [ >string ] dip first-match to>> ;
+    [ >string ] dip first-match dup [ to>> ] when ;
 
 : rule-start-matches? ( rule -- match-count/f )
     dup start>> tuck swap can-match-here? [