pandoc-placetable 0.3 → 0.4
raw patch · 3 files changed
+14/−3 lines, 3 files
Files
- README.md +8/−0
- pandoc-placetable.cabal +1/−1
- pandoc-placetable.hs +5/−2
README.md view
@@ -50,8 +50,16 @@ ## Installation +### Using cabal and Hackage+ cabal update cabal install pandoc-placetable++### Using stack++ git clone git@github.com:mb21/pandoc-placetable.git+ cd pandoc-placetable+ stack install When compiled with the `inlineMarkdown` flag, the `inlinemarkdown=yes`option is available to have CSV and the caption be interpreted as markdown. Note that the flag causes Pandoc to be
pandoc-placetable.cabal view
@@ -1,5 +1,5 @@ Name: pandoc-placetable-Version: 0.3+Version: 0.4 Build-Type: Simple Synopsis: Pandoc filter to include CSV files Description: A Pandoc filter that replaces code blocks (that have the class `table`)
pandoc-placetable.hs view
@@ -116,7 +116,7 @@ Just e -> [["Error parsing CSV: " ++ e]] (headers, rows) = if header && length rows' > 0 then (head rows', tail rows')- else ([], rows')+ else (replicate nrCols [], rows') nrCols = if null rows' then 0 else length $ head rows'@@ -137,7 +137,9 @@ Right (Pandoc _ bs) -> fromList $ extractIns $ head bs Left e -> str $ show e else- str s+ if null s+ then mempty+ then str s strToBlocks s = if inlinemd@@ -148,6 +150,7 @@ else plain $ str s #else+ strToInlines [] = mempty strToInlines s = str s strToBlocks s = plain $ str s #endif