aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs4
-rw-r--r--test/command/11299.md24
2 files changed, 27 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index d6e01d703..4c9518737 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -659,6 +659,10 @@ inlineTag = do
TagOpen "del" _ -> B.strikeout <$> inlinesInTags "del"
TagOpen "sub" _ -> B.subscript <$> inlinesInTags "sub"
TagOpen "sup" _ -> B.superscript <$> inlinesInTags "sup"
+ TagOpen "var" _ -> B.codeWith ("",["variable"],[]) <$> textInTags "var"
+ TagOpen "samp" _ -> B.codeWith ("",["sample"],[]) <$> textInTags "samp"
+ TagOpen "kbd" _ -> B.spanWith ("",["kbd"],[]) <$> inlinesInTags "kbd"
+ TagOpen "mark" _ -> B.spanWith ("",["mark"],[]) <$> inlinesInTags "mark"
TagOpen "code" _ -> encode <$> inlinesInTags "code"
TagOpen "tt" _ -> do
inTT <- mwInTT <$> getState
diff --git a/test/command/11299.md b/test/command/11299.md
index 3c7995cb2..b8da865a9 100644
--- a/test/command/11299.md
+++ b/test/command/11299.md
@@ -1,6 +1,28 @@
```
% pandoc -f mediawiki -t native
<foo>
+
+<samp>x</samp>
+
+<kbd>x</kbd>
+
+<var>x</var>
+
+<mark>This is ''highlighted''</mark>
^D
-[ Para [ Str "<foo>" ] ]
+[ Para [ Str "<foo>" ]
+, Para [ Code ( "" , [ "sample" ] , [] ) "x" ]
+, Para [ Span ( "" , [ "kbd" ] , [] ) [ Str "x" ] ]
+, Para [ Code ( "" , [ "variable" ] , [] ) "x" ]
+, Para
+ [ Span
+ ( "" , [ "mark" ] , [] )
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "highlighted" ]
+ ]
+ ]
+]
```