From 8ec370674f2da33e72da1e5ba50203fdb98f10ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Ma=C5=82olepszy?= Date: Mon, 8 Jan 2024 17:46:55 +0100 Subject: [PATCH 1/3] Allow options on closing markup placeholders --- exploration/open-close-placeholders.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/exploration/open-close-placeholders.md b/exploration/open-close-placeholders.md index c918682349..ded6cc7313 100644 --- a/exploration/open-close-placeholders.md +++ b/exploration/open-close-placeholders.md @@ -101,6 +101,8 @@ _What context is helpful to understand this proposal?_ - 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. +- 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. + - As a developer, I want to connect message markup with existing element instances in the UI. - As a developer, I want to sanitize translations without removing the markup important to the message. @@ -135,9 +137,12 @@ a non-empty sequence of pattern parts (text, placeholders). Markup spans may be nested, as in `Bold and also italic`. -Markup may have localisable options, +Open and standalone markup may have localisable options, such as `Click here to continue`. +Open, close and standalone markup may have non-localisable options, +such as `Click {#a id=a1}here{/a ref=a1} to {#a id=a2}continue{/a ref=a2}`. + As with function options, markup options should be defined in a registry so that they can be validated. @@ -173,7 +178,7 @@ placeholder = expression / markup markup = "{" [s] markup-open [s] ["/"] "}" / "{" [s] markup-close [s] "}" markup-open = "#" name *(s option) -markup-close = "/" name +markup-close = "/" name *(s option) ``` This is similar to [Mustache](http://mustache.github.io/mustache.5.html)'s control flow syntax. From 257ea4fd26de5297dd33bfaefe59aac80d5d1058 Mon Sep 17 00:00:00 2001 From: Addison Phillips Date: Tue, 13 Feb 2024 08:36:29 -0800 Subject: [PATCH 2/3] Update exploration/open-close-placeholders.md --- exploration/open-close-placeholders.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/exploration/open-close-placeholders.md b/exploration/open-close-placeholders.md index ded6cc7313..5a72b04f79 100644 --- a/exploration/open-close-placeholders.md +++ b/exploration/open-close-placeholders.md @@ -137,7 +137,18 @@ a non-empty sequence of pattern parts (text, placeholders). Markup spans may be nested, as in `Bold and also italic`. -Open and standalone markup may have localisable options, +Markup placeholders can contain options. + +Some option values might require translation themselves. +For example, `Click here to continue.` + +The meaning of markup options is externally defined. +Some uses might require specific values +such as when used by tools to associate markup values +in pairs: `Click {#a id=a1}here{/a ref=a1} to {#a id=a2}continue{/a ref=a2}`. + +> [!NOTE] +> Many markup systems do not use or permit options on close values. such as `Click here to continue`. Open, close and standalone markup may have non-localisable options, From e6ecb68b7f05971d5e135b1c0a77900bc6c4caf7 Mon Sep 17 00:00:00 2001 From: Addison Phillips Date: Tue, 13 Feb 2024 08:38:06 -0800 Subject: [PATCH 3/3] Update exploration/open-close-placeholders.md --- exploration/open-close-placeholders.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/exploration/open-close-placeholders.md b/exploration/open-close-placeholders.md index 5a72b04f79..b125eed5eb 100644 --- a/exploration/open-close-placeholders.md +++ b/exploration/open-close-placeholders.md @@ -151,9 +151,6 @@ in pairs: `Click {#a id=a1}here{/a ref=a1} to {#a id=a2}continue{/a ref=a2}`. > Many markup systems do not use or permit options on close values. such as `Click here to continue`. -Open, close and standalone markup may have non-localisable options, -such as `Click {#a id=a1}here{/a ref=a1} to {#a id=a2}continue{/a ref=a2}`. - As with function options, markup options should be defined in a registry so that they can be validated.