You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid inline attribute groups silently delete brace-delimited prose #522
Brace-delimited prose that cannot form valid inline attributes is consumed and silently removed from the document. For the first two inputs above, the output contains only the bold word Result:
[["p",{},["strong",{},"Result"]]]
The third input is a control: valid attributes still work, producing:
[["p",{"title":"valid"},["strong",{},"Result"]]]
Expected: reject an invalid attribute group as attribute syntax and preserve its contents as ordinary Markdown text, rather than deleting the group. Valid attribute syntax should continue to work.
The second example is deliberately not enclosed in $ math delimiters: it represents generated prose with a bare arithmetic/TeX-like expression. It need not become typeset math, but its contents should remain visible. Enclosing supported expressions in $...$ is a separate, working math-rendering case.
Additional context
With 0.5.1, the second input instead produces an attribute named (3\,574+5\,852)\times9/44, which causes InvalidCharacterError when the Svelte renderer calls setAttribute. The newer property-name validation avoids that exception, but still consumes the invalid group and loses the expression. Returning a non-match for the entire invalid inline-attribute group would preserve the original content without forwarding an invalid attribute to a renderer.
No production message, user identity, or private application data is needed for this reproduction.
Activity