Skip to content

Commit e55f91e

Browse files
stasmaphillips
andauthored
Allow options on closing markup placeholders (#582)
* Allow options on closing markup placeholders * Update exploration/open-close-placeholders.md * Update exploration/open-close-placeholders.md --------- Co-authored-by: Addison Phillips <[email protected]>
1 parent 18eb521 commit e55f91e

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

exploration/open-close-placeholders.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ _What context is helpful to understand this proposal?_
101101
102102
- As a CAT tool, I want to use the concepts of open, close, and standalone that I am already familiar with, to provide certain functionalities above.
103103
104+
- As a CAT tool, I want to pair open and close markup even when there are multiple elements of the same type and even when they overlap each other.
105+
104106
- As a developer, I want to connect message markup with existing element instances in the UI.
105107
106108
- As a developer, I want to sanitize translations without removing the markup important to the message.
@@ -135,7 +137,18 @@ a non-empty sequence of pattern parts (text, placeholders).
135137
Markup spans may be nested,
136138
as in `<b>Bold and <i>also italic</i></b>`.
137139
138-
Markup may have localisable options,
140+
Markup placeholders can contain options.
141+
142+
Some option values might require translation themselves.
143+
For example, `Click <a title="Link tooltip">here</a> to continue.`
144+
145+
The meaning of markup options is externally defined.
146+
Some uses might require specific values
147+
such as when used by tools to associate markup values
148+
in pairs: `Click {#a id=a1}here{/a ref=a1} to {#a id=a2}continue{/a ref=a2}`.
149+
150+
> [!NOTE]
151+
> Many markup systems do not use or permit options on close values.
139152
such as `Click <a title="Link tooltip">here</a> to continue`.
140153
141154
As with function options,
@@ -173,7 +186,7 @@ placeholder = expression / markup
173186
markup = "{" [s] markup-open [s] ["/"] "}"
174187
/ "{" [s] markup-close [s] "}"
175188
markup-open = "#" name *(s option)
176-
markup-close = "/" name
189+
markup-close = "/" name *(s option)
177190
```
178191
179192
This is similar to [Mustache](http://mustache.github.io/mustache.5.html)'s control flow syntax.

0 commit comments

Comments
 (0)