diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2020-03-03 19:03:28 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-03 19:03:28 +0300 |
| commit | f3afb4f396643b6574787ae41e0167a575470eaa (patch) | |
| tree | 3936bcfcb912e79e50f70410ea79f85f0344f074 /spec | |
| parent | 8e93e26c43006f3033ba35a981a20251e2de7725 (diff) | |
resolves #317 fix `<<anchor,link text>>` to show link text (#318)
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/xref_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/xref_spec.rb b/spec/xref_spec.rb index 4dc88a4..f6ec8bc 100644 --- a/spec/xref_spec.rb +++ b/spec/xref_spec.rb @@ -47,5 +47,18 @@ describe 'Asciidoctor::Epub3::Converter - Xref' do expect(chapter).not_to be_nil expect(chapter.content).to include '<a id="xref--bibliography--pp" href="bibliography.xhtml#pp" class="xref">[pp]</a>' end + + it 'displays anchor text' do + book = to_epub <<~EOS += Article + +<<_subsection,link text>> + +== Subsection + EOS + article = book.item_by_href '_article.xhtml' + expect(article).not_to be_nil + expect(article.content).to include '<a id="xref-_subsection" href="#_subsection" class="xref">link text</a>' + end end end |
