-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix(dart) - add highlighting for class and function names #4169
base: main
Are you sure you want to change the base?
Conversation
Build Size ReportChanges to minified artifacts in 5 files changedTotal change +258 B View Changes
|
src/languages/dart.js
Outdated
{ | ||
// prevent built-in types with capital letter from being selected as title.class | ||
match: BUILT_IN_TYPES_REGEX, | ||
skip: true |
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.
Why skip?
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.
Why wouldn't a built-in class also get title.class
? That or perhaps built_in
I'd 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.
Using this snippet as an example:
class Person {
String name;
int age;
Person(this.name, this.age);
}
Currently the library already marks String as built_in
, so I added this regex to prevent String from being matched as title.class
. I may have misunderstood what skip is used for (still learning how the library works) - I set skip: true
because otherwise String wasn't decorated at all. I thought we wanted to preserve the current behavior, but if it's ok to use title.class
for built-in classes I can remove this part
Build Size ReportChanges to minified artifacts in 5 files changedTotal change +258 B View Changes
|
Build Size ReportChanges to minified artifacts in 5 files changedTotal change +274 B View Changes
|
Build Size ReportChanges to minified artifacts in 5 files changedTotal change +163 B View Changes
|
Resolves #4091
Changes
Before class and function names were not decorated and this could impact readability
Now these elements are correctly highlighted
Checklist
CHANGES.md