set non-key/value attributes to themselves

db4
Doug Coleman 2009-04-01 13:42:38 -05:00
parent 09e4d34ff2
commit d52535b63a
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ V{
{ "foo" "bar" }
{ "href" "http://factorcode.org/" }
{ "baz" "quux" }
{ "nofollow" f }
{ "nofollow" "nofollow" }
} f f }
}
] [ "<a href = \"http://factorcode.org/\" nofollow foo = bar baz='quux'a=pirsqd >" parse-html ] unit-test

View File

@ -85,7 +85,7 @@ SYMBOL: tagstack
: parse-key/value ( state-parser -- key value )
[ read-key >lower ]
[ skip-whitespace "=" take-sequence ]
[ swap [ read-value ] [ drop f ] if ] tri ;
[ swap [ read-value ] [ drop dup ] if ] tri ;
: (parse-attributes) ( state-parser -- )
skip-whitespace