-
Notifications
You must be signed in to change notification settings - Fork 13
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
slightly more precise types for format nodes #97
Conversation
@@ -137,25 +137,25 @@ export type TextNode = { | |||
|
|||
export type StarNode = { | |||
name: 'star'; | |||
contents: FragmentNode[]; | |||
contents: (TextNode | CommentNode | TagNode)[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a breaking change anyway, is there sufficient reason to continue supporting comments and tags inside *
, `
, and ~
formatting wrappers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is breaking in the sense of requiring integration work in ecmarkup, but not in the sense of requiring any specifications to change. Whereas prohibiting tags inside of *
would actually be a breaking change for at least Temporal. Since I've already written the code necessary to support the more complicated types there's not that much to be gained by restricting these and forcing Temporal to adapt, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. I've opened tc39/proposal-temporal#2494 against Temporal regardless, and don't see any offending text in either ecma262 or ecma402. It might also make a good linter check, but that's obviously not necessary.
And if the functionality is worth keeping, it should probably be documented at https://github.com/tc39/ecmarkdown#inline-formatting .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should probably be documented at
It is, I think? The constraint on _
is "cannot contain whitespace or other formatting characters", whereas the constraint on *
is "cannot contain asterisks", for example.
Edit: wait, no, that's entirely the wrong statement.
see #96 (comment)
Note that this is a breaking change.