Fixed inlined code in dokuwiki writer (#386)
This commit is contained in:
parent
4c48433a2a
commit
0961d49912
2 changed files with 7 additions and 12 deletions
|
@ -48,7 +48,6 @@ import Text.Pandoc.Options
|
|||
import Text.Pandoc.Shared
|
||||
import Text.Pandoc.Writers.Shared
|
||||
import Text.Pandoc.Templates (renderTemplate')
|
||||
import Text.Pandoc.XML ( escapeStringForXML ) -- TODO Remove this line
|
||||
import Data.List ( intersect, intercalate )
|
||||
import Network.URI ( isURI )
|
||||
import Control.Monad.State
|
||||
|
@ -86,10 +85,6 @@ pandocToDokuWiki opts (Pandoc meta blocks) = do
|
|||
then return $ renderTemplate' (writerTemplate opts) context
|
||||
else return main
|
||||
|
||||
-- | Escape special characters for DokuWiki.
|
||||
escapeString :: String -> String -- TODO Remove this
|
||||
escapeString = escapeStringForXML
|
||||
|
||||
-- | Convert Pandoc block element to DokuWiki.
|
||||
blockToDokuWiki :: WriterOptions -- ^ Options
|
||||
-> Block -- ^ Block element
|
||||
|
@ -412,7 +407,7 @@ inlineToDokuWiki opts (Quoted DoubleQuote lst) = do
|
|||
inlineToDokuWiki opts (Cite _ lst) = inlineListToDokuWiki opts lst
|
||||
|
||||
inlineToDokuWiki _ (Code _ str) =
|
||||
return $ "<code>" ++ (escapeString str) ++ "</code>"
|
||||
return $ "''" ++ str++ "''"
|
||||
|
||||
inlineToDokuWiki _ (Str str) = return $ str
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ So is **//this//** word.
|
|||
|
||||
So is **//this//** word.
|
||||
|
||||
This is code: <code>></code>, <code>$</code>, <code>\</code>, <code>\$</code>, <code><html></code>.
|
||||
This is code: ''>'', ''$'', ''\'', ''\$'', ''<html>''.
|
||||
|
||||
<del>This is //strikeout//.</del>
|
||||
|
||||
|
@ -456,7 +456,7 @@ These should not be superscripts or subscripts, because of the unescaped spaces:
|
|||
|
||||
‘He said, “I want to go.”’ Were you alive in the 70’s?
|
||||
|
||||
Here is some quoted ‘<code>code</code>’ and a “[[http://example.com/?foo=1&bar=2|quoted link]]”.
|
||||
Here is some quoted ‘''code''’ and a “[[http://example.com/?foo=1&bar=2|quoted link]]”.
|
||||
|
||||
Some dashes: one—two — three—four — five.
|
||||
|
||||
|
@ -480,10 +480,10 @@ Ellipses…and…and….
|
|||
|
||||
These shouldn’t be math:
|
||||
|
||||
* To get the famous equation, write <code>$e = mc^2$</code>.
|
||||
* To get the famous equation, write ''$e = mc^2$''.
|
||||
* $22,000 is a //lot// of money. So is $34,000. (It worked if “lot” is emphasized.)
|
||||
* Shoes ($20) and socks ($5).
|
||||
* Escaped <code>$</code>: $73 //this should be emphasized// 23$.
|
||||
* Escaped ''$'': $73 //this should be emphasized// 23$.
|
||||
|
||||
Here’s a LaTeX table:
|
||||
|
||||
|
@ -615,7 +615,7 @@ An e-mail address: [[mailto:nobody@nowhere.net|nobody@nowhere.net]]
|
|||
|
||||
<blockquote>Blockquoted: http://example.com/
|
||||
</blockquote>
|
||||
Auto-links should not occur here: <code><http://example.com/></code>
|
||||
Auto-links should not occur here: ''<http://example.com/>''
|
||||
|
||||
<code>or here: <http://example.com/></code>
|
||||
|
||||
|
@ -641,7 +641,7 @@ Subsequent blocks are indented to show that they belong to the footnote (as with
|
|||
|
||||
<code> { <code> }</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 reference, because it contains a space.[^my note] Here is an inline note.((This is //easier// to type. Inline notes may contain [[http://google.com|links]] and <code>]</code> verbatim characters, as well as [bracketed text].
|
||||
)) This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.((This is //easier// to type. Inline notes may contain [[http://google.com|links]] and '']'' verbatim characters, as well as [bracketed text].
|
||||
))
|
||||
|
||||
<blockquote>Notes can go in quotes.((In quote.
|
||||
|
|
Loading…
Reference in a new issue