Skip to content

Commit

Permalink
sourcepos: failing footnotes test
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Mar 31, 2023
1 parent 575a987 commit 3a4b73d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/tests/footnotes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,36 @@ fn footnote_with_superscript() {
),
);
}

#[test]
fn sourcepos() {
assert_ast_match!(
[extension.footnotes],
"Here is a footnote reference.[^1]\n"
"\n"
"Here is a longer footnote reference.[^ref]\n"
"\n"
"[^1]: Here is the footnote.\n"
"[^ref]: Here is another footnote.\n",
(document (1:1-6:33) [
(paragraph (1:1-1:33) [
(text (1:1-1:29) "Here is a footnote reference.")
(footnote_reference (1:30-1:33))
])
(paragraph (3:1-3:42) [
(text (3:1-3:36) "Here is a longer footnote reference.")
(footnote_reference (3:37-3:42))
])
(footnote_definition (5:1-5:27) [
(paragraph (5:7-5:27) [
(text (5:7-5:27) "Here is the footnote.")
])
])
(footnote_definition (6:1-6:33) [
(paragraph (6:9-6:33) [
(text (6:9-6:33) "Here is another footnote.")
])
])
])
);
}

0 comments on commit 3a4b73d

Please sign in to comment.