diff --git a/basis/xmode/code2html/code2html-tests.factor b/basis/xmode/code2html/code2html-tests.factor
index a35e6a2194..8d5db4a6e9 100644
--- a/basis/xmode/code2html/code2html-tests.factor
+++ b/basis/xmode/code2html/code2html-tests.factor
@@ -22,4 +22,8 @@ kernel io.streams.string xml.writer ;
[ ": foo ;" ] [
{ ": foo ;" } "factor" htmlize-lines xml>string
+] unit-test
+
+[ ":foo" ] [
+ { ":foo" } "factor" htmlize-lines xml>string
] unit-test
\ No newline at end of file
diff --git a/basis/xmode/marker/marker.factor b/basis/xmode/marker/marker.factor
index 98b4f91f86..b4c1cd6a48 100755
--- a/basis/xmode/marker/marker.factor
+++ b/basis/xmode/marker/marker.factor
@@ -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? [