diff options
| author | John MacFarlane <[email protected]> | 2025-01-30 21:44:24 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-01-30 22:21:10 -0800 |
| commit | ec397b4502e66c840a553f998214ee0d609dcc33 (patch) | |
| tree | d1041959e9f67ed714fde12891eef7c263bee96e /src | |
| parent | 3c8ca600eff9db0e3f2a5740df85680cc2c8cec3 (diff) | |
ODT reader: fix unwanted block quotes.
Previously the reader created block quotes whenever a paragraph
was marked indented (even though this just affects the first line).
With this change we still generate block quotes for content that
has an altered left margin, but not for indented paragraphs.
See #10575.
This patch does NOT address the related #9505 which concerns lists.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Readers/ODT/ContentReader.hs | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/Text/Pandoc/Readers/ODT/ContentReader.hs b/src/Text/Pandoc/Readers/ODT/ContentReader.hs index 863bd7ca9..5de1a49a9 100644 --- a/src/Text/Pandoc/Readers/ODT/ContentReader.hs +++ b/src/Text/Pandoc/Readers/ODT/ContentReader.hs @@ -400,32 +400,17 @@ getParaModifier props | any isBlockQuote props = id where isBlockQuote SProps {..} | Just paraProps <- paraProperties - , isQuoteWidth (indentation paraProps) - (margin_left paraProps) + , isQuoteWidth (margin_left paraProps) = True | otherwise = False - isQuoteWidth mIndent mMargin - | LengthValueMM indent <- mIndent - , indent > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_MM_ - = True + isQuoteWidth mMargin | LengthValueMM margin <- mMargin , margin > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_MM_ = True - | LengthValueMM indent <- mIndent - , LengthValueMM margin <- mMargin - = indent + margin > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_MM_ - - | PercentValue indent <- mIndent - , indent > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_PERCENT_ - = True | PercentValue margin <- mMargin , margin > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_PERCENT_ = True - | PercentValue indent <- mIndent - , PercentValue margin <- mMargin - = indent + margin > _MINIMUM_INDENTATION_FOR_BLOCKQUOTES_IN_PERCENT_ - | otherwise = False |
