diff options
| author | John MacFarlane <[email protected]> | 2024-10-12 10:17:06 -0600 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-10-13 15:51:05 -0600 |
| commit | c8fda8f4d38a05fd494e7ee74d9c75930bdbcf12 (patch) | |
| tree | 823a25f9c39eac66397dbeef950a6f6d7fde01b6 /test/command | |
| parent | 32c1a31f61b012aaae784138fb2a049ccdd496ad (diff) | |
RST reader: Use a new one-pass parsing strategy.
Instead of having an initial pass where we collect reference
definitions, we create links with target `##SUBST##something`
or `##REF##something` or `##NOTE##something`, and resolve these
in a pass over the parsed AST.
This allows us to handle link references that are not at the
top level. Closes #10281.
Diffstat (limited to 'test/command')
| -rw-r--r-- | test/command/10281.md | 68 | ||||
| -rw-r--r-- | test/command/512.md | 2 |
2 files changed, 69 insertions, 1 deletions
diff --git a/test/command/10281.md b/test/command/10281.md new file mode 100644 index 000000000..a946061e7 --- /dev/null +++ b/test/command/10281.md @@ -0,0 +1,68 @@ +``` +% pandoc -f rst -t native +`Want Speed? Pass by Value`_ + +.. note:: + For more information about the pass-by-value idiom, read: `Want Speed? Pass by Value`_. + + .. _Want Speed? Pass by Value: https://web.archive.org/web/20140205194657/http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ +^D +[ Para + [ Link + ( "" , [] , [] ) + [ Str "Want" + , Space + , Str "Speed?" + , Space + , Str "Pass" + , Space + , Str "by" + , Space + , Str "Value" + ] + ( "https://web.archive.org/web/20140205194657/http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/" + , "" + ) + ] +, Div + ( "" , [ "note" ] , [] ) + [ Div ( "" , [ "title" ] , [] ) [ Para [ Str "Note" ] ] + , Para + [ Str "For" + , Space + , Str "more" + , Space + , Str "information" + , Space + , Str "about" + , Space + , Str "the" + , Space + , Str "pass-by-value" + , Space + , Str "idiom," + , Space + , Str "read:" + , Space + , Link + ( "" , [] , [] ) + [ Str "Want" + , Space + , Str "Speed?" + , Space + , Str "Pass" + , Space + , Str "by" + , Space + , Str "Value" + ] + ( "https://web.archive.org/web/20140205194657/http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/" + , "" + ) + , Str "." + ] + ] +] + +``` + diff --git a/test/command/512.md b/test/command/512.md index 20053d9cd..48f1f101a 100644 --- a/test/command/512.md +++ b/test/command/512.md @@ -37,7 +37,7 @@ Loop detection: __ link1_ ^D -2> [WARNING] Circular reference 'link1' at line 1 column 15 +2> [WARNING] Circular reference 'link1' at line 8 column 1 <p><a href="">click here</a></p> ``` |
