Skip to content

Change the syntax of the ::open and :/close function calls #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions spec/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,14 @@ Between the brackets, the following contents are used:
> Example: `{:platform}`

- Opening _expression_ with no operand:
U+002B PLUS SIGN `+` followed by the _function_ _name_
U+003A COLON `:` followed by U+003A COLON `:` and then by the _function_ _name_

> Example: `{+tag}`
> Example: `{::tag}`

- Closing _expression_ with no operand:
U+002D HYPHEN-MINUS `-` followed by the _function_ _name_
U+003A COLON `:` followed by U+002F SOLIDUS `/` and then by the _function_ _name_

> Example: `{-tag}`
> Example: `{:/tag}`

- Otherwise: The U+FFFD REPLACEMENT CHARACTER `�` character

Expand Down
2 changes: 1 addition & 1 deletion spec/message.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ annotation = (function *(s option)) / reserved

literal = quoted / unquoted
variable = "$" name
function = (":" / "+" / "-") name
function = ":" [":" / "/"] name
option = name [s] "=" [s] (literal / variable)

; reserved keywords are always lowercase
Expand Down
16 changes: 8 additions & 8 deletions spec/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ plucking the first name from the object representing a person:
Functions use one of the following prefix sigils:

- `:` for standalone content
- `+` for starting or opening elements
- `-` for ending or closing elements
- `::` for starting or opening elements
- `:/ for ending or closing elements

A message with two markup-like _functions_, `button` and `link`,
which the runtime can use to construct a document tree structure for a UI framework:

{{+button}Submit{-button} or {+link}cancel{-link}.}
{{::button}Submit{:/button} or {::link}cancel{:/link}.}

An opening element MAY be present in a message without a corresponding closing element,
and vice versa.
Expand Down Expand Up @@ -395,17 +395,17 @@ option = name [s] "=" [s] (literal / variable)
> ```
>
> ```
> {+ssml.emphasis level=strong}
> {::ssml.emphasis level=strong}
> ```
>
> Message examples:
>
> ```
> {This is {+b}bold{-b}.}
> {This is {::b}bold{:/b}.}
> ```
>
> ```
> {{+h1 name=above-and-beyond}Above And Beyond{-h1}}
> {{::h1 name=above-and-beyond}Above And Beyond{:/h1}}
> ```

#### Reserved
Expand Down Expand Up @@ -483,7 +483,7 @@ unquoted-start = name-start / DIGIT / "."
### Names

The **_name_** token is used for variable names (prefixed with `$`),
function names (prefixed with `:`, `+` or `-`),
function names (prefixed with `:`, `::` or `:/`),
as well as option names.
It is based on XML's [Name](https://www.w3.org/TR/xml/#NT-Name),
with the restriction that it MUST NOT start with `:`,
Expand All @@ -492,7 +492,7 @@ Otherwise, the set of characters allowed in names is large.

```abnf
variable = "$" name
function = (":" / "+" / "-") name
function = ":" [":" / "/"] name

name = name-start *name-char
name-start = ALPHA / "_"
Expand Down