aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authormb21 <mb21@users.noreply.github.com>2015-12-05 14:12:20 +0100
committermb21 <mb21@users.noreply.github.com>2015-12-13 21:40:12 +0100
commit2060f5fe83db613f878c712378a68cb88f452669 (patch)
tree3319dd50653dfda4954560149564806b1b6fea3d /src/Text/Pandoc/Readers
parent30644b291b7a23c4e41b69611a8ee5c8d386c3c3 (diff)
downloadpandoc-2060f5fe83db613f878c712378a68cb88f452669.tar.gz
new function to extract multiple properties at once in CSS.hs
and use it in Textile reader
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs
index 502595e0b..355285f54 100644
--- a/src/Text/Pandoc/Readers/Textile.hs
+++ b/src/Text/Pandoc/Readers/Textile.hs
@@ -537,11 +537,8 @@ image :: Parser [Char] ParserState Inlines
image = try $ do
char '!' >> notFollowedBy space
(ident, cls, kvs) <- attributes
- let getAtt k styles = case pickStyleAttrProps [k] styles of
- Just v -> [(k, v)]
- Nothing -> []
let attr = case lookup "style" kvs of
- Just stls -> (ident, cls, getAtt "width" stls ++ getAtt "height" stls)
+ Just stls -> (ident, cls, pickStylesToKVs ["width", "height"] stls)
Nothing -> (ident, cls, kvs)
src <- manyTill anyChar' (lookAhead $ oneOf "!(")
alt <- option "" (try $ (char '(' >> manyTill anyChar' (char ')')))