Created
November 20, 2011 18:03
-
-
Save rwst/1380600 to your computer and use it in GitHub Desktop.
proposed patch to pandoc-types, simple addition of String parameter to Image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Text/Pandoc/Builder.hs b/Text/Pandoc/Builder.hs | |
index 664c656..e062271 100644 | |
--- a/Text/Pandoc/Builder.hs | |
+++ b/Text/Pandoc/Builder.hs | |
@@ -269,8 +269,9 @@ link url title x = singleton $ Link (toList x) (url, title) | |
image :: String -- ^ URL | |
-> String -- ^ Title | |
-> Inlines -- ^ Alt text | |
+ -> String -- ^ Size information (i.e. width) | |
-> Inlines | |
-image url title x = singleton $ Image (toList x) (url, title) | |
+image url title x size = singleton $ Image (toList x) (url, title) size | |
note :: Blocks -> Inlines | |
note = singleton . Note . toList | |
diff --git a/Text/Pandoc/Definition.hs b/Text/Pandoc/Definition.hs | |
index 0256643..d47e10c 100644 | |
--- a/Text/Pandoc/Definition.hs | |
+++ b/Text/Pandoc/Definition.hs | |
@@ -134,7 +134,7 @@ data Inline | |
| RawInline Format String -- ^ Raw inline | |
| Link [Inline] Target -- ^ Hyperlink: text (list of inlines), target | |
| Image [Inline] Target -- ^ Image: alt text (list of inlines), target | |
- -- and target | |
+ String -- and target | |
| Note [Block] -- ^ Footnote or endnote | |
deriving (Show, Eq, Ord, Read, Typeable, Data) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment