4ef4235 started it. This is also good for html emails like in
extra/webapps/mason/backend/watchdog/watchdog.factor .
I just grepped for "<html>".
<?xml version='1.0' ?>
+<!DOCTYPE html>
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
<html><body><t:form t:action=""><t:recaptcha/></t:form></body></html>
</t:chloe>
<?xml version='1.0' ?>
+<!DOCTYPE html>
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
<html>
<body><t:recaptcha/>
] unit-test
{ } [
- "<html>arbitrary <b>markup</b> for the win!</html>" "html" set-value
+ "<!DOCTYPE html><html>arbitrary <b>markup</b> for the win!</html>" "html" set-value
] unit-test
-{ "<html>arbitrary <b>markup</b> for the win!</html>" } [
+{ "<!DOCTYPE html><html>arbitrary <b>markup</b> for the win!</html>" } [
[ "html" html render ] with-string-writer
] unit-test
] with-scope
] unit-test
-{ "<html><head><title>Hello world</title></head><body>Blah blah</body></html>" } [
+{ "<!DOCTYPE html><html><head><title>Hello world</title></head><body>Blah blah</body></html>" } [
[
[
"test2" test-template call-template
<?xml version='1.0' ?>
-
+<!DOCTYPE html>
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
<html>
<head>
<% USING: math ; %>
-
+<!DOCTYPE html>
<html>
<head><title>Simple Embedded Factor Example</title></head>
<body>
-
-
+<!DOCTYPE html>
<html>
<head><title>Simple Embedded Factor Example</title></head>
<body>
<dispatcher>
<action>
[ a get-global "a" set-value ] >>init
- [ [ "<html>" write "a" <field> render "</html>" write ] "text/html" <content> ] >>display
+ [ [ "<!DOCTYPE html><html>" write "a" <field> render "</html>" write ] "text/html" <content> ] >>display
[ { { "a" [ v-integer ] } } validate-params ] >>validate
[ "a" value a set-global URL" " <redirect> ] >>submit
<conversations>
: trivial-response-body ( code message -- )
<XML
+ <!DOCTYPE html>
<html>
<body>
<h1><-> <-></h1>
-<html><head><title>Hello</title></head><body>HTTPd test</body></html>
+<!DOCTYPE html><html><head><title>Hello</title></head><body>HTTPd test</body></html>
+<!DOCTYPE html>
<html>
<head>
<title>Lazy Evaluation</title>
HELP: sensitive-tags
{ $var-description "Contains a sequence of " { $link name } "s where whitespace should be considered significant for prettyprinting purposes. The sequence can contain " { $link string } "s in place of names. For example, to preserve whitespace inside a " { $snippet "pre" } " tag:" }
{ $example "USING: xml.syntax xml.writer namespaces ;
-[XML <html> <head> <title> something</title></head><body><pre>bing
+[XML <!DOCTYPE html> <html> <head> <title> something</title></head><body><pre>bing
bang
bong</pre></body></html> XML] { \"pre\" } sensitive-tags [ pprint-xml ] with-variable"
"
+<!DOCTYPE html>
<html>
<head>
<title>
[ "" ] [ path over first find-mode htmlize-lines ]
if-empty :> input
default-stylesheet :> stylesheet
- <XML <html>
+ <XML <!DOCTYPE html> <html>
<head>
<-stylesheet->
<title><-path-></title>
file mode>> load-mode :> rules
f lines [| l i | l rules tokenize-line i 1 + line#len line#>string htmlize-tokens ]
map-index concat nip :> html-lines
- <XML <html>
+ <XML <!DOCTYPE html> <html>
<head>
<title><-name-></title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
dir [
files toc-list :> toc
- <XML <html>
+ <XML <!DOCTYPE html> <html>
<head>
<title><-name-></title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
T{ tag f text f "foo" f }
}
} [
- "<html><head><title>foo</title></head></html>" parse-html
+ "<!DOCTYPE html><html><head><title>foo</title></head></html>" parse-html
"title" find-between-first
] unit-test
'[
common-report
_ call( -- xml )
- [XML <html><body><-><-></body></html> XML]
+ [XML <!DOCTYPE html><html><body><-><-></body></html> XML]
write-xml
] with-file-writer ; inline
+<!DOCTYPE html>
<html>
<head>
<title>Parser Combinators</title>
-<?xml version='1.0' ?>
+<!DOCTYPE html>
<html>
<head><title>Upload</title></head>
<body>
-<?xml version='1.0' ?>
+<!DOCTYPE html>
<html>
<head><title>Uploaded</title></head>
<body>
: crashed-builder-body ( crashed-builders -- string content-type )
[ os/cpu [XML <li><-></li> XML] ] map
<XML
+ <!DOCTYPE html>
<html>
<body>
<p>Machines which are not sending heartbeats:</p>
<?xml version='1.0' ?>
-
+<!DOCTYPE html>
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
<html>
+<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery-1.2.3.min.js"></script>
! Display the string in a web page.
[
swap dup
+ "<!DOCTYPE html>" print
<html>
<head> <title> write </title> </head>
<body>
: read-number ( -- )
[
+ "<!DOCTYPE html>" print
<html>
<head> <title> "Enter a number" write </title> </head>
<body>