Skip to content
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

Suspected typo in EXAMPLE 1 of "3.11.6 Messages with embedded links" #656

Open
davidmalcolm opened this issue Aug 19, 2024 · 1 comment
Open
Labels

Comments

@davidmalcolm
Copy link

"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
Copy link
Contributor

dmk42 commented Sep 5, 2024

This does indeed appear to be a typo. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants