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
May be worth including in the core grammar. Let me know if you agree. The injection grammar will not work as is, we're relying on another injection grammar that handles separating the leading stars of the doc block from the documentation content itself
Matt Bierner (@mjbvz) I don't think that's as easy as it seems .. I think that need to be handled by editors (by removing starting * on each line). Without that the results will be too unpredictable.
Activity
sheetalkamat commentedon Dec 5, 2018
Isnt this already scoped correctly because of #688
mjbvz commentedon Dec 5, 2018
This is for highlighting the content
1 + 1as typescript. Right now, it is just treated as a single tokensheetalkamat commentedon Dec 13, 2018
Matt Bierner (@mjbvz) I don't think that's as easy as it seems .. I think that need to be handled by editors (by removing starting
*on each line). Without that the results will be too unpredictable.mjbvz commentedon Dec 14, 2018
We use a while rule to do this, see: https://github.com/Microsoft/vscode/blob/master/extensions/typescript-basics/syntaxes/ExampleJsDoc.injection.tmLanguage.json
It consumes the leading
*on each line so that the regular js/ts grammar runs without modification inside the commentsheetalkamat commentedon Dec 14, 2018
I still don't understand how multiline example is going to work. Where do you consume leading
*wasn't able to figure that out.mjbvz commentedon Dec 14, 2018
Looks like the logic that was moved into this file: https://github.com/Microsoft/vscode/blob/master/extensions/typescript-basics/syntaxes/MarkdownDocumentationInjection.tmLanguage.json
The
whilerule is run on every line until it fails. In this case, it consumes the leading*so that rules inside thewhilenever see it.Consume leading docblock *