microsoft / tsdoc

A doc comment standard for TypeScript
https://tsdoc.org/
MIT License
4.7k stars 130 forks source link

[playground] Add TSDoc parsing, banner #310

Closed noahbuscher closed 2 years ago

noahbuscher commented 2 years ago

After getting a bit confused TSDoc because of the playground myself (I initially thought the parser would parse the types for me) so I made a quick PR to make two changes that I have seen in #115 and #152:

Disable Parsing of Typescript

I just went ahead and made a parser in Monaco for TSDoc. It isn't perfect, but it keeps track of if you're in a block and doesn't parse Typescript/Javascript. As you can see in the screenshot below, the function after the TSDoc is not highlighted.

Add Banner to the Playground

Added a small banner to further reinforce that neither TSDoc nor the playground parses Typescript.

playground-screenshot
ghost commented 2 years ago

CLA assistant check
All CLA requirements met.

octogonz commented 2 years ago

@noahbuscher Sorry your PR got overlooked. (For future reference, you can let us know in the #contributor-helpline chat room.)

Thanks for making this change -- it's definitely better! 👍👍

noahbuscher commented 2 years ago

No worries at all! Will definitely ping in there for future PRs.