-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for convert_footnotes_to_github_styles()
- Loading branch information
Showing
7 changed files
with
505 additions
and
4 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
55 changes: 55 additions & 0 deletions
55
components/markdown/src/snapshots/markdown__markdown__tests__def_before_use.snap
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
source: components/markdown/src/markdown.rs | ||
expression: events | ||
--- | ||
[ | ||
Start( | ||
Paragraph, | ||
), | ||
Text( | ||
Borrowed( | ||
"There is footnote definition?", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
"<sup class=\"footnote-reference\" id=\"fr-1-1\"><a href=\"#fn-1\">[1]</a></sup>", | ||
), | ||
), | ||
End( | ||
Paragraph, | ||
), | ||
Html( | ||
Borrowed( | ||
"<hr><ol class=\"footnotes-list\">\n", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
"<li id=\"fn-1\">", | ||
), | ||
), | ||
Start( | ||
Paragraph, | ||
), | ||
Text( | ||
Borrowed( | ||
"It's before the reference.", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
" <a href=\"#fr-1-1\">↩</a></p>\n", | ||
), | ||
), | ||
Html( | ||
Borrowed( | ||
"</li>\n", | ||
), | ||
), | ||
Html( | ||
Borrowed( | ||
"</ol>\n", | ||
), | ||
), | ||
] |
88 changes: 88 additions & 0 deletions
88
components/markdown/src/snapshots/markdown__markdown__tests__footnote_inside_footnote.snap
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
source: components/markdown/src/markdown.rs | ||
expression: events | ||
--- | ||
[ | ||
Start( | ||
Paragraph, | ||
), | ||
Text( | ||
Borrowed( | ||
"This text has a footnote", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
"<sup class=\"footnote-reference\" id=\"fr-1-1\"><a href=\"#fn-1\">[1]</a></sup>", | ||
), | ||
), | ||
End( | ||
Paragraph, | ||
), | ||
Html( | ||
Borrowed( | ||
"<hr><ol class=\"footnotes-list\">\n", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
"<li id=\"fn-1\">", | ||
), | ||
), | ||
Start( | ||
Paragraph, | ||
), | ||
Text( | ||
Borrowed( | ||
"But the footnote has another footnote", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
"<sup class=\"footnote-reference\" id=\"fr-2-1\"><a href=\"#fn-2\">[2]</a></sup>", | ||
), | ||
), | ||
Text( | ||
Borrowed( | ||
".", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
" <a href=\"#fr-1-1\">↩</a></p>\n", | ||
), | ||
), | ||
Html( | ||
Borrowed( | ||
"</li>\n", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
"<li id=\"fn-2\">", | ||
), | ||
), | ||
Start( | ||
Paragraph, | ||
), | ||
Text( | ||
Borrowed( | ||
"That's it.", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
" <a href=\"#fr-2-1\">↩</a></p>\n", | ||
), | ||
), | ||
Html( | ||
Borrowed( | ||
"</li>\n", | ||
), | ||
), | ||
Html( | ||
Borrowed( | ||
"</ol>\n", | ||
), | ||
), | ||
] |
65 changes: 65 additions & 0 deletions
65
components/markdown/src/snapshots/markdown__markdown__tests__multiple_refs.snap
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
source: components/markdown/src/markdown.rs | ||
expression: events | ||
--- | ||
[ | ||
Start( | ||
Paragraph, | ||
), | ||
Text( | ||
Borrowed( | ||
"This text has two", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
"<sup class=\"footnote-reference\" id=\"fr-1-1\"><a href=\"#fn-1\">[1]</a></sup>", | ||
), | ||
), | ||
Text( | ||
Borrowed( | ||
" identical footnotes", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
"<sup class=\"footnote-reference\" id=\"fr-1-2\"><a href=\"#fn-1\">[1]</a></sup>", | ||
), | ||
), | ||
End( | ||
Paragraph, | ||
), | ||
Html( | ||
Borrowed( | ||
"<hr><ol class=\"footnotes-list\">\n", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
"<li id=\"fn-1\">", | ||
), | ||
), | ||
Start( | ||
Paragraph, | ||
), | ||
Text( | ||
Borrowed( | ||
"So one is present.", | ||
), | ||
), | ||
Html( | ||
Boxed( | ||
" <a href=\"#fr-1-1\">↩</a> <a href=\"#fr-1-2\">↩2</a></p>\n", | ||
), | ||
), | ||
Html( | ||
Borrowed( | ||
"</li>\n", | ||
), | ||
), | ||
Html( | ||
Borrowed( | ||
"</ol>\n", | ||
), | ||
), | ||
] |
60 changes: 60 additions & 0 deletions
60
components/markdown/src/snapshots/markdown__markdown__tests__no_footnotes.snap
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
source: components/markdown/src/markdown.rs | ||
expression: events | ||
--- | ||
[ | ||
Start( | ||
Paragraph, | ||
), | ||
Text( | ||
Borrowed( | ||
"Some text ", | ||
), | ||
), | ||
Start( | ||
Emphasis, | ||
), | ||
Text( | ||
Borrowed( | ||
"without", | ||
), | ||
), | ||
End( | ||
Emphasis, | ||
), | ||
Text( | ||
Borrowed( | ||
" footnotes.", | ||
), | ||
), | ||
End( | ||
Paragraph, | ||
), | ||
Start( | ||
Paragraph, | ||
), | ||
Text( | ||
Borrowed( | ||
"Only ", | ||
), | ||
), | ||
Start( | ||
Strikethrough, | ||
), | ||
Text( | ||
Borrowed( | ||
"fancy", | ||
), | ||
), | ||
End( | ||
Strikethrough, | ||
), | ||
Text( | ||
Borrowed( | ||
" formatting.", | ||
), | ||
), | ||
End( | ||
Paragraph, | ||
), | ||
] |
Oops, something went wrong.