-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[commonmark] make html comments, html inlines, html blocks and links compliant #1135
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
ffd386a
add commonmark tests for (inline) raw html
Feder1co5oave 056f4e2
add commonmark tests for html comments
Feder1co5oave 9450b09
new inline html rule, to comply with commonmark
Feder1co5oave 652ba97
new html comment rule to comply with commonmark (html5).
Feder1co5oave b2611c1
allow colons in tag names and attributes. Decrease group depth in regex
Feder1co5oave f2ebd43
allow a regex source string as a parameter for edit()
Feder1co5oave 27d4da6
refactor tag inline rule
Feder1co5oave 4de3c98
refactor html block rule
Feder1co5oave c12c5d7
rename gfm_links -> gfm_autolinks
Feder1co5oave 316db0a
rename test headings-id -> headings_id
Feder1co5oave d89012f
remove superfluous test fixture (already covered by original/links_re…
Feder1co5oave 8e30cd2
!fixup b2611c1b05
Feder1co5oave bcf9abb
divide html_comments test into subtests
Feder1co5oave 1b8ca2b
option `pedantic` overrides `gfm`, and turns off gfm, tables and breaks.
Feder1co5oave c1ef53c
add commonmark tests for html blocks
Feder1co5oave 56972f8
save the current html block parsing in the pedantic mode
Feder1co5oave d08039e
new rule for html blocks, to comply with commonmark.
Feder1co5oave 7abf702
adjust html_comments test case in accordance with commonmark
Feder1co5oave fb2f317
rearrange test in cm_html_blocks to test end of file
Feder1co5oave 0904e44
add commonmark tests for links
Feder1co5oave de66018
encode urls with %xx entities
Feder1co5oave d2cef5a
escape html entities in link/image href
Feder1co5oave ef64418
encode urls in tests accordingly
Feder1co5oave 786334a
allow frontmatter in original tests
Feder1co5oave bf9c9c5
Revert fac31ed "allow matched double quotes in link definition title …
Feder1co5oave 821e2da
allow matched double quotes in link definition title only in pedantic…
Feder1co5oave dc92048
test literal_quotes_in_titles in pedantic mode
Feder1co5oave 3be817b
save current link parsing in pedantic mode
Feder1co5oave 6750997
test links_inline_style in pedantic mode
Feder1co5oave e66f7aa
don't allow spaces in link URIs
Feder1co5oave fc17a2c
allow backslash-escapes in link text, href, title and link definition…
Feder1co5oave 9f20c46
allow ONE level of matching parenthesis in links.
Feder1co5oave d8ff951
allow unbalanced parenthesis in links URIs wrapped in angle brackets
Feder1co5oave 277d093
let html entities in link URIs pass through as-is (we cannot decode t…
Feder1co5oave 3afc360
allow link titles to be wrapped in parenthesis
Feder1co5oave 29d33d9
remove commonmark test #478 because we treat U+00A0 (non-breaking spa…
Feder1co5oave 271d357
[security] fix possible ReDOS vulnerable regex rule by refactoring (d…
Feder1co5oave 47365c1
allow brackets in link text if they are inside a code span. Add test.
Feder1co5oave 8877ff7
[refactor] rename rule inside -> label
Feder1co5oave ca349c8
allow ONE level of matching parenthesis in link text.
Feder1co5oave 5125739
run test cm_links with xhtml
Feder1co5oave eb95a71
[commonmark] BREAKING CHANGE: link nesting is not allowed. If multipl…
Feder1co5oave 13dd38a
add tests for link nesting
Feder1co5oave ef3516c
!fixup eb95a71
Feder1co5oave 5b135c3
lint marked.js
Feder1co5oave 55f47f1
remove commonmark tests 489-491 for nested links
Feder1co5oave 7a80cdf
Revert 13dd38a "add tests for link nesting"
Feder1co5oave f21a4d6
Revert eb95a71 "[commonmark] BREAKING CHANGE: link nesting is not all…
Feder1co5oave 2094181
remove commonmark tests 492, 495-497 for link precedence with other m…
Feder1co5oave aeca6a1
allow only one level of matching brackets in reference links text.
Feder1co5oave 5536922
allow link nesting, adjust tests 503-504 accordingly. NON-COMPLIANT w…
Feder1co5oave e56e35a
remove commonmark tests 505, 507-509 for link precedence with other m…
Feder1co5oave 22b06cc
perform space normalization when storing link reference labels
Feder1co5oave b9394a0
BREAKING CHANGE: space is no longer allowed between [link text] and […
Feder1co5oave fc97171
run original tests with spaces between link text and label in pedanti…
Feder1co5oave d47dc29
fix test 513
Feder1co5oave f584aca
do not process escapes in link labels
Feder1co5oave eea3932
fix tests in cm_links
Feder1co5oave 8594a06
link labels must have at least one non-whitespace character
Feder1co5oave 209dff1
add collapsed reference [links][] = [links][links]
Feder1co5oave ea48e96
fix tests in cm_links
Feder1co5oave dfc5b3e
remove commonmark test 535 (link precedence with other markup).
Feder1co5oave d29f68a
fix tests in cm_links
Feder1co5oave 2e23540
adjust commonmark tests 544-548, 556, 560 that contain markup inside …
Feder1co5oave f7d4d21
update the list of markdown escapes, per commonmark
Feder1co5oave c398550
do not allow control characters in link destinations, per commonmark
Feder1co5oave e4fd972
fix tests whitespace
Feder1co5oave 680a6c3
Merge remote-tracking branch 'markedjs/master' into cm_links
Feder1co5oave 163a482
re-enable cm_autolinks test case (now passing)
Feder1co5oave 4e2b647
document `pedantic` option overrides `gfm`
Feder1co5oave 9cb1900
fix backtracking vulnerability in `block.pedantic.html` as in #1083
Feder1co5oave b738cd6
Merge remote-tracking branch 'markedjs/master' into cm_links
Feder1co5oave 4aa4f02
re-enable passing commonmark tests
Feder1co5oave bc7c9db
do not allow newlines inside html attributes, make cm test 60 pass
Feder1co5oave d94a68c
do not randomize jasmine tests (different spec files interfered with …
Feder1co5oave 4e52c42
Merge branch 'master' into pr/1135
UziTech 5396950
remove passing tests
UziTech 8815ba3
randomize tests
UziTech a6c6f0d
update completed table
UziTech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add collapsed reference [links][] = [links][links]
- Loading branch information
commit 209dff15ef154fa0ab0c64765a4074691d81eecc
There are no files selected for viewing
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@davisjam the commonmark spec is covered by this rule (and subrules at lines 530 and following). This is safe because the href part can't contain spaces, so the URI stops at the closing ) or at the first space.