diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-04-26 01:26:34 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2023-04-26 01:26:34 -0600 |
| commit | ee151038d6fe36c0e44b254ce9af999192f99a24 (patch) | |
| tree | e97cb88f419b53f1b0e31ca1078b0d7e80f1a4b9 /test/links_test.rb | |
| parent | 0ca66dcacd0dd19cd5b3a1906285ddbfec1d4d91 (diff) | |
add test to verify parser correctly handles shorthand inline ref when resolved reftext is empty
Diffstat (limited to 'test/links_test.rb')
| -rw-r--r-- | test/links_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/links_test.rb b/test/links_test.rb index 6df501dd..745813eb 100644 --- a/test/links_test.rb +++ b/test/links_test.rb @@ -388,6 +388,14 @@ context 'Links' do assert_xpath '//a[@id = "1-install"]', output, 0 end + test 'reftext of shorthand inline ref cannot resolve to empty' do + input = '[[no-such-id,{empty}]]text' + doc = document_from_string input + assert_empty doc.catalog[:refs] + output = doc.convert standalone: false + assert_includes output, (input.sub '{empty}', '') + end + test 'inline ref with reftext' do %w([[tigers,Tigers]] anchor:tigers[Tigers]).each do |anchor| doc = document_from_string %(Here you can read about tigers.#{anchor}) |
