Treat tabs as spaces in ODT Reader. (#7185)
This commit is contained in:
parent
fd0873c907
commit
40da6c402b
4 changed files with 9 additions and 1 deletions
|
@ -577,7 +577,10 @@ read_spaces = matchingElement NsText "s" (
|
|||
read_line_break :: InlineMatcher
|
||||
read_line_break = matchingElement NsText "line-break"
|
||||
$ returnV linebreak
|
||||
|
||||
--
|
||||
read_tab :: InlineMatcher
|
||||
read_tab = matchingElement NsText "tab"
|
||||
$ returnV space
|
||||
--
|
||||
read_span :: InlineMatcher
|
||||
read_span = matchingElement NsText "span"
|
||||
|
@ -585,6 +588,7 @@ read_span = matchingElement NsText "span"
|
|||
$ matchChildContent [ read_span
|
||||
, read_spaces
|
||||
, read_line_break
|
||||
, read_tab
|
||||
, read_link
|
||||
, read_note
|
||||
, read_citation
|
||||
|
@ -604,6 +608,7 @@ read_paragraph = matchingElement NsText "p"
|
|||
$ matchChildContent [ read_span
|
||||
, read_spaces
|
||||
, read_line_break
|
||||
, read_tab
|
||||
, read_link
|
||||
, read_note
|
||||
, read_citation
|
||||
|
@ -630,6 +635,7 @@ read_header = matchingElement NsText "h"
|
|||
children <- ( matchChildContent [ read_span
|
||||
, read_spaces
|
||||
, read_line_break
|
||||
, read_tab
|
||||
, read_link
|
||||
, read_note
|
||||
, read_citation
|
||||
|
|
|
@ -176,6 +176,7 @@ namesOfTestsComparingToNative = [ "blockquote"
|
|||
, "referenceToText"
|
||||
, "simpleTable"
|
||||
, "simpleTableWithCaption"
|
||||
, "tab"
|
||||
-- , "table"
|
||||
, "textMixedStyles"
|
||||
, "tableWithContents"
|
||||
|
|
1
test/odt/native/tab.native
Normal file
1
test/odt/native/tab.native
Normal file
|
@ -0,0 +1 @@
|
|||
[Para [Str "Three",Space,Str "tabs",Space,Str "between",Space,Str "A",Space,Str "and",Space,Str "B",Space,Str "will",Space,Str "be",Space,Str "converted",Space,Str "to",Space,Str "one",Space,Str "Space:",Space,Str "A",Space,Str "B."]]
|
BIN
test/odt/odt/tab.odt
Normal file
BIN
test/odt/odt/tab.odt
Normal file
Binary file not shown.
Loading…
Reference in a new issue