Suspected typo in EXAMPLE 1 of "3.11.6 Messages with embedded links"
Opened this issue · 1 comments
davidmalcolm commented
"3.11.6 Messages with embedded links" has:
EXAMPLE 1: Consider this embedded link whose link text contains square brackets and backslashes:
"message": {
"text": "Prohibited term used in [para\\[0\\]\\\\spans\\[2\\](1)."
}
A SARIF viewer would render it as follows:
Prohibited term used in para[0]\spans[2].
Am I right in thinking that within the text
property, the embedded link's link text is erroneously not being terminated?
It appears to me that in the string value the \\]
after the spans\\[2
in the encoded JSON string is part of the link text, not part of a ](
within this production:
embedded link = "[", link text, "](", link destination, ")";
and thus EXAMPLE 1 is missing a final unescaped ]
before the (1)
; i.e. should:
"text": "Prohibited term used in [para\\[0\\]\\\\spans\\[2\\](1)."
instead be:
"text": "Prohibited term used in [para\\[0\\]\\\\spans\\[2\\]](1)."
with that extra ]
?
FWIW, spotted whilst implementing embedded links for GCC output - I tried this example as a unit test; my code is emitting:
"Prohibited term used in [para\\[0\\]\\\\spans\\[2\\]](1)."
for that example, rather than
"Prohibited term used in [para\\[0\\]\\\\spans\\[2\\](1)."
from the spec.
dmk42 commented
This does indeed appear to be a typo. Thanks!