set non-key/value attributes to themselves
parent
09e4d34ff2
commit
d52535b63a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue