diagrams-haddock 0.1.1.2 → 0.1.2.0
raw patch · 4 files changed
+14/−8 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGES.md +5/−0
- README.md +6/−6
- diagrams-haddock.cabal +1/−1
- src/Diagrams/Haddock.hs +2/−1
CHANGES.md view
@@ -1,3 +1,8 @@+0.1.2.0 (1 September 2013)+--------------------------++ - part before # is now optional when writing a new diagram URL+ 0.1.1.2 (22 August 2013) ------------------------
README.md view
@@ -37,15 +37,15 @@ ## Adding diagrams to source files -Haddock supports inline links to images with the syntax-`<<URL>>`. To indicate an image which should be automatically-generated from some diagrams code, use the special syntax+Haddock supports inline links to images with the syntax `<<URL>>`. To+indicate an image which should be automatically generated from some+diagrams code, use the special syntax `<<URL#diagram=name&key1=val1&key2=val2&...>>`. The URL will be automatically filled in by `diagrams-haddock`, so when you first-create an inline image placeholder you can put any arbitrary text in-its place. For example, you might write+create an inline image placeholder you can simply omit it (or put any+arbitrary text in its place). For example, you might write - <<dummy#diagram=mySquare&width=200&height=300>>+ <<#diagram=mySquare&width=200&height=300>> indicating an image which should be generated using the definition of `mySquare`, with a maximum width of 200 and maximum height of 300.
diagrams-haddock.cabal view
@@ -1,5 +1,5 @@ name: diagrams-haddock-version: 0.1.1.2+version: 0.1.2.0 synopsis: Preprocessor for embedding diagrams in Haddock documentation description: diagrams-haddock is a tool for compiling embedded inline diagrams code in Haddock documentation, for an
src/Diagrams/Haddock.hs view
@@ -164,10 +164,11 @@ displayOpt (k,v) = k ++ "=" ++ v -- | Parse things of the form @\<\<URL#diagram=name&key=val&...\>\>@.+-- The URL is optional (the @#@, however, is required). parseDiagramURL :: Parser DiagramURL parseDiagramURL = DiagramURL- <$> (string "<<" *> many1 (noneOf "#>"))+ <$> (string "<<" *> many (noneOf "#>")) <*> (char '#' *> string "diagram=" *> many1 (noneOf "&>")) <*> ((M.fromList <$> many parseKeyValPair) <* string ">>")