Skip to content
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 FontFeature initial, ListStyleType initial #1379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions lib/src/css_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -937,13 +937,19 @@
nextExp.text == "off" ||
nextExp.text == "1" ||
nextExp.text == "0")) {
fontFeatures.add(FontFeature(exp.text,
try {
fontFeatures.add(FontFeature(exp.text,

Check warning on line 941 in lib/src/css_parser.dart

View check run for this annotation

Codecov / codecov/patch

lib/src/css_parser.dart#L941

Added line #L941 was not covered by tests
nextExp.text == "on" || nextExp.text == "1" ? 1 : 0));
} catch (_) {}
Copy link
Owner

Choose a reason for hiding this comment

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

Can you describe a little bit about why we're doing this and ignoring the caught error? Is there a GitHub issue you can reference to describe what the justification for this PR is?

Copy link
Author

Choose a reason for hiding this comment

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

it was a long time ago so i don't remember clearly. there was a case that caused the init font reading to fail, i added it so it wouldn't affect the rendering

} else {
fontFeatures.add(FontFeature.enable(exp.text));
try {
fontFeatures.add(FontFeature.enable(exp.text));

Check warning on line 946 in lib/src/css_parser.dart

View check run for this annotation

Codecov / codecov/patch

lib/src/css_parser.dart#L946

Added line #L946 was not covered by tests
} catch (_) {}
}
} else {
fontFeatures.add(FontFeature.enable(exp.text));
try {
fontFeatures.add(FontFeature.enable(exp.text));

Check warning on line 951 in lib/src/css_parser.dart

View check run for this annotation

Codecov / codecov/patch

lib/src/css_parser.dart#L951

Added line #L951 was not covered by tests
} catch (_) {}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/src/style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ extension MergeBorders on Border? {
}

enum ListStyleType {
initial('initial'),
arabicIndic('arabic-indic'),
armenian('armenian'),
lowerArmenian('lower-armenian'),
Expand Down
Loading