Skip to content
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 @@ class ExpressionMapping {
nextExp.text == "off" ||
nextExp.text == "1" ||
nextExp.text == "0")) {
fontFeatures.add(FontFeature(exp.text,
try {
fontFeatures.add(FontFeature(exp.text,
nextExp.text == "on" || nextExp.text == "1" ? 1 : 0));
} catch (_) {}

Copy link
Copy Markdown
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
Copy Markdown
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));
} catch (_) {}
}
} else {
fontFeatures.add(FontFeature.enable(exp.text));
try {
fontFeatures.add(FontFeature.enable(exp.text));
} 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 @@ -600,6 +600,7 @@ extension MergeBorders on Border? {
}

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