parent
9a47237412
commit
75cba828b5
3 changed files with 18 additions and 10 deletions
|
@ -493,19 +493,12 @@ escapedInline :: GenParser Char ParserState Inline
|
|||
escapedInline = escapedEqs <|> escapedTag
|
||||
|
||||
escapedEqs :: GenParser Char ParserState Inline
|
||||
escapedEqs = Str <$> (try $ surrounded (string "==") anyChar)
|
||||
|
||||
-- -- | literal text escaped between == ... ==
|
||||
-- escapedEqs :: GenParser Char ParserState Inline
|
||||
-- escapedEqs = try $ do
|
||||
-- string "=="
|
||||
-- contents <- manyTill anyChar (try $ string "==")
|
||||
-- return $ Str contents
|
||||
escapedEqs = Str <$> (try $ string "==" *> manyTill anyChar (try $ string "=="))
|
||||
|
||||
-- | literal text escaped btw <notextile> tags
|
||||
escapedTag :: GenParser Char ParserState Inline
|
||||
escapedTag = try $ Str <$>
|
||||
enclosed (string "<notextile>") (try $ string "</notextile>") anyChar
|
||||
escapedTag = Str <$>
|
||||
(try $ string "<notextile>" *> manyTill anyChar (try $ string "</notextile>"))
|
||||
|
||||
-- | Any special symbol defined in wordBoundaries
|
||||
symbol :: GenParser Char ParserState Inline
|
||||
|
|
|
@ -27,6 +27,10 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
|
|||
,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\n These should not be escaped: \\$ \\\\ \\> \\[ \\{"
|
||||
,CodeBlock ("",[],[]) "Code block with .bc\n continued\n @</\\\n"
|
||||
,Para [Str "Inline",Space,Str "code",Str ":",Space,Code ("",[],[]) "<tt>",Str ",",Space,Code ("",[],[]) "@",Str "."]
|
||||
,Header 1 [Str "Notextile"]
|
||||
,Para [Str "A",Space,Str "block",Space,Str "of",Space,Str "text",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "notextile",Space,Str ":"]
|
||||
,Para [Str "\nNo *bold* and\n* no bullet\n"]
|
||||
,Para [Str "and",Space,Str "inlines",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "double *equals (=)* markup",Str "."]
|
||||
,Header 1 [Str "Lists"]
|
||||
,Header 2 [Str "Unordered"]
|
||||
,Para [Str "Asterisks",Space,Str "tight",Str ":"]
|
||||
|
|
|
@ -70,6 +70,17 @@ bc. Code block with .bc
|
|||
|
||||
Inline code: @<tt>@, <tt>@</tt>.
|
||||
|
||||
h1. Notextile
|
||||
|
||||
A block of text can be protected with notextile :
|
||||
|
||||
<notextile>
|
||||
No *bold* and
|
||||
* no bullet
|
||||
</notextile>
|
||||
|
||||
and inlines can be protected with ==double *equals (=)* markup==.
|
||||
|
||||
h1. Lists
|
||||
|
||||
h2. Unordered
|
||||
|
|
Loading…
Add table
Reference in a new issue