diff --git a/changelog b/changelog index bc4c11ab0..bc18f022b 100644 --- a/changelog +++ b/changelog @@ -89,6 +89,11 @@ pandoc (1.13) `\cite{Coffee}`), can be used without any further escaping (Albert Krewinkel). + * Textile reader and writer: + + + The `raw_tex` extension is no longer set by default. You can + enable it with `textile+raw_tex`. + * DocBook reader: + Support `equation`, `informalequation`, `inlineequation` elements with diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs index c7c64f0fc..fd849316b 100644 --- a/src/Text/Pandoc.hs +++ b/src/Text/Pandoc.hs @@ -304,8 +304,7 @@ getDefaultExtensions "markdown_github" = githubMarkdownExtensions getDefaultExtensions "markdown" = pandocExtensions getDefaultExtensions "plain" = pandocExtensions getDefaultExtensions "org" = Set.fromList [Ext_citations] -getDefaultExtensions "textile" = Set.fromList [Ext_auto_identifiers, - Ext_raw_tex] +getDefaultExtensions "textile" = Set.fromList [Ext_auto_identifiers] getDefaultExtensions "html" = Set.fromList [Ext_auto_identifiers, Ext_native_divs, Ext_native_spans] diff --git a/src/Text/Pandoc/Writers/Textile.hs b/src/Text/Pandoc/Writers/Textile.hs index 3a6982a01..20cb5f6f7 100644 --- a/src/Text/Pandoc/Writers/Textile.hs +++ b/src/Text/Pandoc/Writers/Textile.hs @@ -404,8 +404,10 @@ inlineToTextile _ (Str str) = return $ escapeStringForTextile str inlineToTextile _ (Math _ str) = return $ "" ++ escapeStringForXML str ++ "" -inlineToTextile _ (RawInline f str) +inlineToTextile opts (RawInline f str) | f == Format "html" || f == Format "textile" = return str + | (f == Format "latex" || f == Format "tex") && + isEnabled Ext_raw_tex opts = return str | otherwise = return "" inlineToTextile _ (LineBreak) = return "\n" diff --git a/tests/textile-reader.native b/tests/textile-reader.native index 0a0b10bd3..de0637f5f 100644 --- a/tests/textile-reader.native +++ b/tests/textile-reader.native @@ -155,10 +155,6 @@ Pandoc (Meta {unMeta = fromList []}) [[Plain [Str "this",Space,RawInline (Format "html") "
",Space,Str "won\8217t",Space,Str "produce",Space,Str "raw",Space,Str "html",Space,Str "blocks",Space,RawInline (Format "html") "
"]] ,[Plain [Str "but",Space,Str "this",Space,RawInline (Format "html") "",Space,Str "will",Space,Str "produce",Space,Str "inline",Space,Str "html",Space,RawInline (Format "html") ""]]] ,Para [Str "Can",Space,Str "you",Space,Str "prove",Space,Str "that",Space,Str "2",Space,Str "<",Space,Str "3",Space,Str "?"] -,Header 1 ("raw-latex",[],[]) [Str "Raw",Space,Str "LaTeX"] -,Para [Str "This",Space,Str "Textile",Space,Str "reader",Space,Str "also",Space,Str "accepts",Space,Str "raw",Space,Str "LaTeX",Space,Str "for",Space,Str "blocks",Space,Str ":"] -,RawBlock (Format "latex") "\\begin{itemize}\n \\item one\n \\item two\n\\end{itemize}" -,Para [Str "and",Space,Str "for",Space,RawInline (Format "latex") "\\emph{inlines}",Str "."] ,Header 1 ("acronyms-and-marks",[],[]) [Str "Acronyms",Space,Str "and",Space,Str "marks"] ,Para [Str "PBS (Public Broadcasting System)"] ,Para [Str "Hi\8482"] diff --git a/tests/textile-reader.textile b/tests/textile-reader.textile index e1e143531..dab73b39f 100644 --- a/tests/textile-reader.textile +++ b/tests/textile-reader.textile @@ -235,17 +235,6 @@ Html blocks can be
inlined
as well. Can you prove that 2 < 3 ? -h1. Raw LaTeX - -This Textile reader also accepts raw LaTeX for blocks : - -\begin{itemize} - \item one - \item two -\end{itemize} - -and for \emph{inlines}. - h1. Acronyms and marks PBS(Public Broadcasting System)