Skip to content
Closed
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
8 changes: 4 additions & 4 deletions spec/fixtures/gfm-extensions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ size (100) for parsing delimiters in inlines.c

## Autolinks

```````````````````````````````` example pending
```````````````````````````````` example autolink pending
: http://google.com https://google.com

<http://google.com/å> http://google.com/å
Expand Down Expand Up @@ -637,7 +637,7 @@ http://🍄.ga/ http://x🍄.ga/
<p><a href="http://%F0%9F%8D%84.ga/">http://🍄.ga/</a> <a href="http://x%F0%9F%8D%84.ga/">http://x🍄.ga/</a></p>
````````````````````````````````

```````````````````````````````` example pending
```````````````````````````````` example
This shouldn't crash everything: (_A_@_.A
.
<IGNORE>
Expand Down Expand Up @@ -800,7 +800,7 @@ Hello[^"><script>alert(1)</script>]

Autolink and strikethrough.

```````````````````````````````` example pending
```````````````````````````````` example autolink
~~www.google.com~~

~~http://google.com~~
Expand All @@ -811,7 +811,7 @@ Autolink and strikethrough.

Autolink and tables.

```````````````````````````````` example pending
```````````````````````````````` example autolink
| a | b |
| --- | --- |
| https://github.com www.github.com | http://pokemon.com |
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.cr
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def assert_example(file, section, index, example, smart, gfm = false)
else
it "- #{index}\n#{show_space(markdown)}", file, line do
output = Markd.to_html(markdown, options)
next if html == "<IGNORE>\n"

output.should eq(html), file: file, line: line
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/markd/parsers/inline.cr
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ module Markd::Parser
# Trailing punctuation (specifically, `?`, `!`, `.`, `,`, `:`, `*`, `_`, and `~`)
# will not be considered part of the autolink, though they may be included in the
# interior of the link
while "?!.,:*~_".includes?(text[-1])
while (char = text[-1]?) && "?!.,:*~_".includes?(char)
text = text[0..-2]
end

Expand Down