From 13bc573e7f9e0602404dd37fec2c7cd14b5c56ee Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Wed, 26 Oct 2016 15:53:33 +0200 Subject: Inline code when text has a special style When a piece of text has a text 'Source_Text' then we assume that this is a piece of the document that represents a code that needs to be inlined. Addapted an odt writer to also reflect that change; previously it was just writing a 'preformatted' text using a non-distinguishable font style. Code blocks are still not recognized by the ODT reader. That's a separate issue. --- tests/writer.opendocument | 115 +++++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 62 deletions(-) (limited to 'tests/writer.opendocument') diff --git a/tests/writer.opendocument b/tests/writer.opendocument index 5007c5635..6c84ae31b 100644 --- a/tests/writer.opendocument +++ b/tests/writer.opendocument @@ -668,47 +668,37 @@ - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - + - - + + - + - - - - - - - - - - @@ -1358,22 +1348,22 @@ Markup So is this word. This is code: ->, -$, -\, -\$, -<html>. -This -is -strikeout. +>, +$, +\, +\$, +<html>. +This +is +strikeout. Superscripts: -abcd -ahello -ahello there. +abcd +ahello +ahello there. Subscripts: -H2O, -H23O, -Hmany of themO. +H2O, +H23O, +Hmany of themO. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. @@ -1387,7 +1377,7 @@ trees. So is ‘pine.’ ‘He said, “I want to go.”’ Were you alive in the 70’s? Here is some quoted -‘code’ and a +‘code’ and a “quoted link”. Some dashes: one—two — three—four — @@ -1405,16 +1395,16 @@ five. 2 + 2 = 4 - x ∈ y + x ∈ y - α ∧ ω + α ∧ ω 223 - p-Tree + p-Tree Here’s some display math: @@ -1422,18 +1412,18 @@ five. Here’s one that has a line break in it: - α + ω × x2. + α + ω × x2. These shouldn’t be math: To get the famous equation, write - $e = mc^2$. + $e = mc^2$. $22,000 is a - lot of money. So is $34,000. + lot of money. So is $34,000. (It worked if “lot” is emphasized.) @@ -1441,11 +1431,11 @@ five. Escaped - $: $73 - this - should - be - emphasized + $: $73 + this + should + be + emphasized 23$. @@ -1570,7 +1560,7 @@ link in pointy braces. Blockquoted: http://example.com/ Auto-links should not occur here: -<http://example.com/> +<http://example.com/> or here: <http://example.com/> Images @@ -1595,14 +1585,15 @@ indented to show that they belong to the footnote (as with list items).{ <code> }If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. This -should not be a footnote +should not be a footnote reference, because it contains a space.[^my note] Here is an inline note.3This -is easier to type. Inline notes +is easier to type. Inline notes may contain links -and ] verbatim characters, as -well as [bracketed text]. +and ] verbatim +characters, as well as [bracketed +text]. Notes can go in quotes.4In quote. -- cgit v1.2.3