Docx reader: test for nested anchor spans in header
This ensures that anchor spans in header with content (or with other anchor spans inside) will resolve to links to a header id properly.
This commit is contained in:
parent
95734b2951
commit
fcbb37c8f3
3 changed files with 14 additions and 0 deletions
|
@ -181,6 +181,10 @@ tests = [ testGroup "inlines"
|
|||
"headers already having auto identifiers"
|
||||
"docx/already_auto_ident.docx"
|
||||
"docx/already_auto_ident.native"
|
||||
, testCompare
|
||||
"nested anchor spans in header"
|
||||
"docx/nested_anchors_in_header.docx"
|
||||
"docx/nested_anchors_in_header.native"
|
||||
, testCompare
|
||||
"single numbered item not made into list"
|
||||
"docx/numbered_header.docx"
|
||||
|
|
BIN
tests/docx/nested_anchors_in_header.docx
Normal file
BIN
tests/docx/nested_anchors_in_header.docx
Normal file
Binary file not shown.
10
tests/docx/nested_anchors_in_header.native
Normal file
10
tests/docx/nested_anchors_in_header.native
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Header 1 ("short-instructions",[],[]) [Str "Short",Space,Str "instructions"]
|
||||
,Para [Link ("",[],[]) [Str "Open",Space,Str "remote",Space,Str "folder"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening","")]
|
||||
,Para [Str "Do",Space,Str "staff"]
|
||||
,Para [Link ("",[],[]) [Str "Close",Space,Str "remote",Space,Str "folder"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing","")]
|
||||
,Header 1 ("some-instructions",[],[]) [Str "Some",Space,Str "instructions"]
|
||||
,Para [Str "Lines"]
|
||||
,Header 2 ("remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "opening"]
|
||||
,Para [Str "Open",Space,Str "folder"]
|
||||
,Header 2 ("remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "closing"]
|
||||
,Para [Str "Close",Space,Str "folder"]]
|
Loading…
Add table
Reference in a new issue