Skip to content

Improve support for Dart classes & generics#2810

Merged
RunDevelopment merged 1 commit intoPrismJS:masterfrom
brianegan:dart-classes
Mar 17, 2021
Merged

Improve support for Dart classes & generics#2810
RunDevelopment merged 1 commit intoPrismJS:masterfrom
brianegan:dart-classes

Conversation

@brianegan
Copy link
Contributor

  • No longer depend on keywords such as new or extends
  • Detect PascalCase class names instead
  • Support generic parameters as well
  • Properly highlights class constructors
  • Added tests
Before After
Screenshot from 2021-03-17 14-37-42 Screenshot from 2021-03-17 14-39-15
Screenshot from 2021-03-17 14-38-05 Screenshot from 2021-03-17 14-39-06

@github-actions
Copy link

github-actions bot commented Mar 17, 2021

JS File Size Changes (gzipped)

A total of 1 files have changed, with a combined diff of +228 B (+46.3%).

Details
file master pull size diff % diff
components/prism-dart.min.js 492 B 720 B +228 B +46.3%

Generated by 🚫 dangerJS against 7b42bc5

Copy link
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @brianegan!

One small nit and then gtg.

@RunDevelopment RunDevelopment merged commit d0bcd07 into PrismJS:master Mar 17, 2021
@RunDevelopment
Copy link
Member

Thank you for contributing @brianegan!

@brianegan
Copy link
Contributor Author

brianegan commented Mar 17, 2021 via email

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.

2 participants