Skip to content

Doc comment highlighting#1541

Merged
RunDevelopment merged 29 commits into
PrismJS:masterfrom
RunDevelopment:doc-comment
Feb 28, 2019
Merged

Doc comment highlighting#1541
RunDevelopment merged 29 commits into
PrismJS:masterfrom
RunDevelopment:doc-comment

Conversation

@RunDevelopment

Copy link
Copy Markdown
Member

This PR implements #1475.
It adds support for JavaDoc (Java), PHPDoc (PHP), and JSDoc (JS, JSX, N4JS, TS, TSX).
This will also affect languages which include any of the above languages.

Notes:

  • The current implementation of PHPDoc does not support annotations.
  • TypeScript actually has its own standard called TSDoc but this is only a subset of JSDoc, so we should be fine.

Examples

TypeScript

image

JavaScript

image

Java

image

PHP

image

Comment thread components/prism-javadoclike.js Outdated
Comment thread components/prism-javadoc.js Outdated
Comment thread components/prism-phpdoc.js
@mAAdhaTTah

Copy link
Copy Markdown
Member

Overall, this looks good. Obvs there's some conflicts, but I think they're just files to regen. Regex's seem fine, but I'm not really qualified to review them. That said, I think we're comfortable merging now even if I can't and making changes later if we have improvements.

@RunDevelopment

Copy link
Copy Markdown
Member Author

It's been a while since I last looked at this.
I'd actually like to make a few changes, so please wait a little bit longer.

@RunDevelopment

Copy link
Copy Markdown
Member Author

Alright, I think this is ready now.

@mAAdhaTTah You might want to take a look at the changes I made.

@troy351

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants