set non-key/value attributes to themselves
parent
09e4d34ff2
commit
d52535b63a
|
@ -50,7 +50,7 @@ V{
|
||||||
{ "foo" "bar" }
|
{ "foo" "bar" }
|
||||||
{ "href" "http://factorcode.org/" }
|
{ "href" "http://factorcode.org/" }
|
||||||
{ "baz" "quux" }
|
{ "baz" "quux" }
|
||||||
{ "nofollow" f }
|
{ "nofollow" "nofollow" }
|
||||||
} f f }
|
} f f }
|
||||||
}
|
}
|
||||||
] [ "<a href = \"http://factorcode.org/\" nofollow foo = bar baz='quux'a=pirsqd >" parse-html ] unit-test
|
] [ "<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 )
|
: parse-key/value ( state-parser -- key value )
|
||||||
[ read-key >lower ]
|
[ read-key >lower ]
|
||||||
[ skip-whitespace "=" take-sequence ]
|
[ skip-whitespace "=" take-sequence ]
|
||||||
[ swap [ read-value ] [ drop f ] if ] tri ;
|
[ swap [ read-value ] [ drop dup ] if ] tri ;
|
||||||
|
|
||||||
: (parse-attributes) ( state-parser -- )
|
: (parse-attributes) ( state-parser -- )
|
||||||
skip-whitespace
|
skip-whitespace
|
||||||
|
|
Loading…
Reference in New Issue