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 :: InlineMatcher
|
||||||
read_line_break = matchingElement NsText "line-break"
|
read_line_break = matchingElement NsText "line-break"
|
||||||
$ returnV linebreak
|
$ returnV linebreak
|
||||||
|
--
|
||||||
|
read_tab :: InlineMatcher
|
||||||
|
read_tab = matchingElement NsText "tab"
|
||||||
|
$ returnV space
|
||||||
--
|
--
|
||||||
read_span :: InlineMatcher
|
read_span :: InlineMatcher
|
||||||
read_span = matchingElement NsText "span"
|
read_span = matchingElement NsText "span"
|
||||||
|
@ -585,6 +588,7 @@ read_span = matchingElement NsText "span"
|
||||||
$ matchChildContent [ read_span
|
$ matchChildContent [ read_span
|
||||||
, read_spaces
|
, read_spaces
|
||||||
, read_line_break
|
, read_line_break
|
||||||
|
, read_tab
|
||||||
, read_link
|
, read_link
|
||||||
, read_note
|
, read_note
|
||||||
, read_citation
|
, read_citation
|
||||||
|
@ -604,6 +608,7 @@ read_paragraph = matchingElement NsText "p"
|
||||||
$ matchChildContent [ read_span
|
$ matchChildContent [ read_span
|
||||||
, read_spaces
|
, read_spaces
|
||||||
, read_line_break
|
, read_line_break
|
||||||
|
, read_tab
|
||||||
, read_link
|
, read_link
|
||||||
, read_note
|
, read_note
|
||||||
, read_citation
|
, read_citation
|
||||||
|
@ -630,6 +635,7 @@ read_header = matchingElement NsText "h"
|
||||||
children <- ( matchChildContent [ read_span
|
children <- ( matchChildContent [ read_span
|
||||||
, read_spaces
|
, read_spaces
|
||||||
, read_line_break
|
, read_line_break
|
||||||
|
, read_tab
|
||||||
, read_link
|
, read_link
|
||||||
, read_note
|
, read_note
|
||||||
, read_citation
|
, read_citation
|
||||||
|
|
|
@ -176,6 +176,7 @@ namesOfTestsComparingToNative = [ "blockquote"
|
||||||
, "referenceToText"
|
, "referenceToText"
|
||||||
, "simpleTable"
|
, "simpleTable"
|
||||||
, "simpleTableWithCaption"
|
, "simpleTableWithCaption"
|
||||||
|
, "tab"
|
||||||
-- , "table"
|
-- , "table"
|
||||||
, "textMixedStyles"
|
, "textMixedStyles"
|
||||||
, "tableWithContents"
|
, "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…
Add table
Reference in a new issue