html.parser.printer: don't print comments.

db4
John Benediktsson 2013-10-11 11:51:46 -07:00
parent 8086746ac2
commit 05f3092b9b
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,8 @@ ERROR: unknown-tag-error tag ;
M: text-printer print-opening-tag M: text-printer print-opening-tag
name>> { name>> {
{ "br" [ nl ] } { "br" [ nl ] }
{ "ol" [ nl ] }
{ "ul" [ nl ] }
{ "li" [ " * " write ] } { "li" [ " * " write ] }
[ drop ] [ drop ]
} case ; } case ;
@ -56,6 +58,8 @@ M: text-printer print-closing-tag
] ]
[ "td" = [ " " write ] when ] tri ; [ "td" = [ " " write ] when ] tri ;
M: text-printer print-comment-tag drop ;
M: html-printer print-text-tag ( tag -- ) M: html-printer print-text-tag ( tag -- )
text>> write ; text>> write ;