diff --git a/scribblings/command.scrbl b/scribblings/command.scrbl index d6f55f6..fa5389b 100644 --- a/scribblings/command.scrbl +++ b/scribblings/command.scrbl @@ -133,7 +133,7 @@ Here are a few examples of correct Pollen-mode commands: #lang pollen ◊variable-name ◊tag{Text inside the tag.} - ◊tag['attr: "value"]{Text inside the tag} + ◊tag[#:attr "value"]{Text inside the tag} ◊get-customer-id["Brennan Huff"] ◊tag{His ID is ◊get-customer-id["Brennan Huff"].} } @@ -144,7 +144,7 @@ And some incorrect examples: #lang pollen ◊tag {Text inside the tag.} ; space between first and second parts ◊tag[Text inside the tag] ; text argument needs to be within braces - ◊tag{Text inside the tag}['attr: "value"] ; wrong order + ◊tag{Text inside the tag}[#:attr "value"] ; wrong order } The next section describes each of these parts in detail. @@ -524,9 +524,9 @@ To make a meta, you create a tag with the special @code{define-meta} name. Then #lang pollen ◊define-meta[dog]{Roxy} ; Pollen-mode syntax -◊some-tag['key: "value"]{Normal tag} +◊some-tag[#:key "value"]{Normal tag} ◊(define-meta cat "Chopper") ; equivalent Racket-mode syntax -◊some-tag['key: "value"]{Another normal tag} +◊some-tag[#:key "value"]{Another normal tag} } When you run a source file with metas in it, two things happen. First, the metas are removed from the output: @@ -553,9 +553,9 @@ Still, you can override this too: #lang pollen ◊define-meta[dog]{Roxy} -◊some-tag['key: "value"]{Normal tag} +◊some-tag[#:key "value"]{Normal tag} ◊(define-meta cat "Chopper") -◊some-tag['key: "value"]{Another normal tag} +◊some-tag[#:key "value"]{Another normal tag} ◊(define-meta here-path "tesseract") } diff --git a/scribblings/programming-pollen.scrbl b/scribblings/programming-pollen.scrbl index 85beced..99def1b 100644 --- a/scribblings/programming-pollen.scrbl +++ b/scribblings/programming-pollen.scrbl @@ -44,7 +44,7 @@ A tag with attributes and content: ◊div['((attr1 "val1")(attr2 "val2"))]{My nice div.} A tag with attributes and content (alternate syntax): -◊div['attr1: "val1" 'attr2: "val2"]{My nice div.} +◊div[#:attr1 "val1" #:attr2 "val2"]{My nice div.} } Let's also recall that these commands can be written in Racket mode equivalently: @@ -188,7 +188,7 @@ Detecting attributes in an argument list can be tricky because a) the tag may or (define-values (attributes elements) (split-attributes parts)) `(extra ,attributes (big ,@"@"elements))) -I want to attend ◊em['key: "value"]{RacketCon}.}] +I want to attend ◊em[#:key "value"]{RacketCon}.}] This will move the @racket[elements] inside the @racket[big] tag, and attach the @racket[attributes] to the @racket[extra] tag: diff --git a/scribblings/tag.scrbl b/scribblings/tag.scrbl index 904bcce..9daae32 100644 --- a/scribblings/tag.scrbl +++ b/scribblings/tag.scrbl @@ -71,5 +71,5 @@ Helper function for custom tag functions. Take a rest argument that possibly inc (values attrs elements)) (tag "Hello world") (tag '((key "value")) "Hello world") -(tag 'key: "value" "Hello world") +(tag #:key "value" "Hello world") ] \ No newline at end of file diff --git a/scribblings/tutorial-mini.scrbl b/scribblings/tutorial-mini.scrbl index 99bd7a9..21f3cfa 100644 --- a/scribblings/tutorial-mini.scrbl +++ b/scribblings/tutorial-mini.scrbl @@ -76,7 +76,7 @@ Because @link["https://highlightjs.org/"]{Highlight.js} is browser-based, it doe @codeblock{ #lang pollen/markup -◊pre{◊code['class: "python"]{ +◊pre{◊code[#:class "python"]{ for x in range(3): print x }}}}