-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from alihassan143/optmize
fix: html codec parser fixes
- Loading branch information
Showing
14 changed files
with
284 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ dependencies: | |
htmltopdfwidgets: | ||
path: ../ | ||
|
||
|
||
dev_dependencies: | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,62 @@ | ||
/// | ||
/// Supported partial rendering types: | ||
/// bold, italic, | ||
/// underline, strikethrough, | ||
/// color, font, | ||
/// href | ||
/// | ||
/// Supported global rendering types: | ||
/// heading: h1, h2, h3, h4, h5, h6, ... | ||
/// block quote, | ||
/// list: ordered list, bulleted list, | ||
/// code block | ||
/// | ||
/// This class defines various constants for supported rendering types | ||
/// and attributes in a text processing system. It categorizes them into | ||
/// partial rendering types and global rendering types. | ||
class BuiltInAttributeKey { | ||
static String bold = 'bold'; | ||
static String italic = 'italic'; | ||
static String underline = 'underline'; | ||
static String strikethrough = 'strikethrough'; | ||
static String color = 'color'; | ||
static String backgroundColor = 'backgroundColor'; | ||
static String font = 'font'; | ||
static String href = 'href'; | ||
// Partial rendering types | ||
static String bold = 'bold'; // Text should be displayed in bold. | ||
static String italic = 'italic'; // Text should be displayed in italic. | ||
static String underline = 'underline'; // Text should be underlined. | ||
static String strikethrough = | ||
'strikethrough'; // Text should have a strikethrough line. | ||
static String color = 'color'; // Text color customization. | ||
static String backgroundColor = | ||
'backgroundColor'; // Background color customization. | ||
static String font = 'font'; // Font customization. | ||
static String href = 'href'; // Hyperlink attribute for text. | ||
|
||
static String subtype = 'subtype'; | ||
static String heading = 'heading'; | ||
static String h1 = 'h1'; | ||
static String h2 = 'h2'; | ||
static String h3 = 'h3'; | ||
static String h4 = 'h4'; | ||
static String h5 = 'h5'; | ||
static String h6 = 'h6'; | ||
// Global rendering types | ||
static String subtype = | ||
'subtype'; // Subtype for customizing rendering behavior. | ||
static String heading = | ||
'heading'; // Text should be treated as a heading (h1, h2, h3, etc.). | ||
static String h1 = 'h1'; // Heading level 1. | ||
static String h2 = 'h2'; // Heading level 2. | ||
static String h3 = 'h3'; // Heading level 3. | ||
static String h4 = 'h4'; // Heading level 4. | ||
static String h5 = 'h5'; // Heading level 5. | ||
static String h6 = 'h6'; // Heading level 6. | ||
|
||
static String bulletedList = 'bulleted-list'; | ||
static String numberList = 'number-list'; | ||
static String bulletedList = | ||
'bulleted-list'; // Text should be displayed in a bulleted list. | ||
static String numberList = | ||
'number-list'; // Text should be displayed in a numbered list. | ||
|
||
static String quote = 'quote'; | ||
static String checkbox = 'checkbox'; | ||
static String code = 'code'; | ||
static String number = 'number'; | ||
static String quote = 'quote'; // Text should be displayed as a blockquote. | ||
static String checkbox = | ||
'checkbox'; // Text should be displayed as a checkbox. | ||
static String code = 'code'; // Text should be displayed as code. | ||
static String number = | ||
'number'; // Text should be displayed as a numbered item. | ||
|
||
// Lists of partial style keys and global style keys | ||
static List<String> partialStyleKeys = [ | ||
BuiltInAttributeKey.bold, | ||
BuiltInAttributeKey.italic, | ||
BuiltInAttributeKey.underline, | ||
BuiltInAttributeKey.strikethrough, | ||
BuiltInAttributeKey.backgroundColor, | ||
BuiltInAttributeKey.color, | ||
BuiltInAttributeKey.href, | ||
BuiltInAttributeKey.code, | ||
bold, | ||
italic, | ||
underline, | ||
strikethrough, | ||
backgroundColor, | ||
color, | ||
href, | ||
code, | ||
]; | ||
|
||
static List<String> globalStyleKeys = [ | ||
BuiltInAttributeKey.subtype, | ||
BuiltInAttributeKey.heading, | ||
BuiltInAttributeKey.checkbox, | ||
BuiltInAttributeKey.bulletedList, | ||
BuiltInAttributeKey.numberList, | ||
BuiltInAttributeKey.quote, | ||
subtype, | ||
heading, | ||
checkbox, | ||
bulletedList, | ||
numberList, | ||
quote, | ||
]; | ||
} |
Oops, something went wrong.