add DOCTYPE html in most places.

4ef4235 started it. This is also good for html emails like in
extra/webapps/mason/backend/watchdog/watchdog.factor .

I just grepped for "<html>".
char-rename
Jon Harper 2017-01-05 17:14:33 +01:00 committed by John Benediktsson
parent 97a57f4041
commit 5af166b8f5
23 changed files with 27 additions and 18 deletions

View File

@ -1,4 +1,5 @@
<?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>

View File

@ -1,4 +1,5 @@
<?xml version='1.0' ?>
<!DOCTYPE html>
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
<html>
<body><t:recaptcha/>

View File

@ -145,10 +145,10 @@ M: link-test link-href drop "http://www.apple.com/foo&bar" ;
] 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

View File

@ -32,7 +32,7 @@ IN: html.templates.chloe.tests
] 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

View File

@ -1,5 +1,5 @@
<?xml version='1.0' ?>
<!DOCTYPE html>
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
<html>
<head>

View File

@ -1,5 +1,5 @@
<% USING: math ; %>
<!DOCTYPE html>
<html>
<head><title>Simple Embedded Factor Example</title></head>
<body>

View File

@ -1,5 +1,4 @@
<!DOCTYPE html>
<html>
<head><title>Simple Embedded Factor Example</title></head>
<body>

View File

@ -345,7 +345,7 @@ SYMBOL: a
<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>

View File

@ -20,6 +20,7 @@ IN: http.server.responses
: trivial-response-body ( code message -- )
<XML
<!DOCTYPE html>
<html>
<body>
<h1><-> <-></h1>

View File

@ -1 +1 @@
<html><head><title>Hello</title></head><body>HTTPd test</body></html>
<!DOCTYPE html><html><head><title>Hello</title></head><body>HTTPd test</body></html>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>Lazy Evaluation</title>

View File

@ -56,10 +56,11 @@ HELP: indenter
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>

View File

@ -28,7 +28,7 @@ IN: xmode.code2html
[ "" ] [ path over first find-mode htmlize-lines ]
if-empty :> input
default-stylesheet :> stylesheet
<XML <html>
<XML <!DOCTYPE html> <html>
<head>
<-stylesheet->
<title><-path-></title>

View File

@ -96,7 +96,7 @@ TUPLE: code-file
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" />
@ -116,7 +116,7 @@ TUPLE: code-file
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" />

View File

@ -32,7 +32,7 @@ IN: html.parser.analyzer.tests
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

View File

@ -32,7 +32,7 @@ IN: mason.report
'[
common-report
_ call( -- xml )
[XML <html><body><-><-></body></html> XML]
[XML <!DOCTYPE html><html><body><-><-></body></html> XML]
write-xml
] with-file-writer ; inline

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<title>Parser Combinators</title>

View File

@ -1,4 +1,4 @@
<?xml version='1.0' ?>
<!DOCTYPE html>
<html>
<head><title>Upload</title></head>
<body>

View File

@ -1,4 +1,4 @@
<?xml version='1.0' ?>
<!DOCTYPE html>
<html>
<head><title>Uploaded</title></head>
<body>

View File

@ -7,6 +7,7 @@ IN: webapps.mason.backend.watchdog
: 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>

View File

@ -1,5 +1,5 @@
<?xml version='1.0' ?>
<!DOCTYPE html>
<t:chloe xmlns:t="http://factorcode.org/chloe/1.0">
<html>

View File

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery-1.2.3.min.js"></script>

View File

@ -40,6 +40,7 @@ IN: webapps.numbers
! Display the string in a web page.
[
swap dup
"<!DOCTYPE html>" print
<html>
<head> <title> write </title> </head>
<body>
@ -51,6 +52,7 @@ IN: webapps.numbers
: read-number ( -- )
[
"<!DOCTYPE html>" print
<html>
<head> <title> "Enter a number" write </title> </head>
<body>