-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Normalize parse and render options #145
Changes from 2 commits
f02ea75
fd690b5
2d0af64
62e70d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,23 +7,28 @@ module Config | |
OPTS = { | ||
parse: { | ||
DEFAULT: 0, | ||
SOURCEPOS: (1 << 1), | ||
UNSAFE: (1 << 17) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To keep it inline with the deprecated SAFE flag, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like a comma is missing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤦 |
||
VALIDATE_UTF8: (1 << 9), | ||
SMART: (1 << 10), | ||
LIBERAL_HTML_TAG: (1 << 12), | ||
FOOTNOTES: (1 << 13), | ||
STRIKETHROUGH_DOUBLE_TILDE: (1 << 14), | ||
UNSAFE: (1 << 17) | ||
}.freeze, | ||
render: { | ||
DEFAULT: 0, | ||
SOURCEPOS: (1 << 1), | ||
HARDBREAKS: (1 << 2), | ||
UNSAFE: (1 << 17), | ||
NOBREAKS: (1 << 4), | ||
VALIDATE_UTF8: (1 << 9), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I copied over all of the |
||
SMART: (1 << 10), | ||
GITHUB_PRE_LANG: (1 << 11), | ||
LIBERAL_HTML_TAG: (1 << 12), | ||
FOOTNOTES: (1 << 13) | ||
STRIKETHROUGH_DOUBLE_TILDE: (1 << 14), | ||
TABLE_PREFER_STYLE_ATTRIBUTES: (1 << 15), | ||
FULL_INFO_STRING: (1 << 16), | ||
UNSAFE: (1 << 17), | ||
FOOTNOTES: (1 << 13) | ||
}.freeze, | ||
format: %i[html xml commonmark plaintext].freeze | ||
}.freeze | ||
|
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.
NEW parse option:
As far as I can tell, we check for
SOURCEPOS
ininlines.c
, and if the flag is set we annotate the node with sourcepos info, thereby allowing someone implementing their own renderer to also add sourcepos info to their output.