From 7e2a5c85cfbb84af16f40c4dc9f0b7522cf1f1a1 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 14 Feb 2014 17:57:44 -0800 Subject: [PATCH] add html source --- html.rkt | 19 +++++++++++++++++++ main.rkt | 2 ++ 2 files changed, 21 insertions(+) create mode 100644 html.rkt diff --git a/html.rkt b/html.rkt new file mode 100644 index 0000000..ec748bc --- /dev/null +++ b/html.rkt @@ -0,0 +1,19 @@ +#lang racket/base + +;; for now, body is deemed a block, not inline +;; todo: is this legit? Why is body inline? +(define block-tags + '(address article aside audio blockquote body canvas dd div dl fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 header hgroup noscript ol output p pre section table tfoot ul video)) + + +;; for now, map is omitted because it's a Racket keyword +;; for now, style, script, and link are omitted because they shouldn't be wrapped +;; todo: figure out how to resolve this. should be able to use html version of map. +;; possibly prefixed? Probably a good idea so it doesn't collide with user namespace +(define inline-tags + '(a abbr acronym applet area b base basefont bdo big br button caption center cite code col colgroup del dir dfn dt em embed font frame framesethead hr html i iframe img input ins isindex kbd label legend li menu meta noframes object optgroup option param q s samp select small span strike strong sub sup tbody td textarea th thead title tr tt u var xmp)) + +(define tags (append block-tags inline-tags)) + + +(provide (all-defined-out)) \ No newline at end of file diff --git a/main.rkt b/main.rkt index 0e73f03..a5a8048 100644 --- a/main.rkt +++ b/main.rkt @@ -4,6 +4,7 @@ "colors.rkt" "column.rkt" "font-face.rkt" + "html.rkt" "gradient.rkt" "misc.rkt" "transition.rkt" @@ -15,6 +16,7 @@ "colors.rkt" "font-face.rkt" "gradient.rkt" + "html.rkt" "misc.rkt" "transition.rkt" "typography.rkt"))