Skip to content

Commit fe4ad76

Browse files
committed
Ensure that filepaths are properly normalised
1 parent 4ae637c commit fe4ad76

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

MANUAL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
The file MANUAL.md is automatically generated by the tools/mkmanual.ps1 script. Do not edit manually.
33
-->
44

5-
# pandoc-plot 0.9.1.0
6-
75
## A Pandoc filter to generate figures from code blocks in documents
86

97
`pandoc-plot` turns code blocks present in your documents (Markdown, LaTeX, etc.) into embedded figures, using your plotting toolkit of choice, including Matplotlib, ggplot2, MATLAB, Mathematica, and more.

docs/MANUAL.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ <h1 class="title">pandoc-plot 0.9.1.0 manual</h1>
8888
<!--
8989
The file MANUAL.md is automatically generated by the tools/mkmanual.ps1 script. Do not edit manually.
9090
-->
91-
<h1 id="pandoc-plot-0.9.1.0">pandoc-plot 0.9.1.0</h1>
9291
<h2 id="a-pandoc-filter-to-generate-figures-from-code-blocks-in-documents">A Pandoc filter to generate figures from code blocks in documents</h2>
9392
<p><code>pandoc-plot</code> turns code blocks present in your documents (Markdown, LaTeX, etc.) into embedded figures, using your plotting toolkit of choice, including Matplotlib, ggplot2, MATLAB, Mathematica, and more.</p>
9493
<ul>

docs/index.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/plots/10130279783601906841.html

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

src/Text/Pandoc/Filter/Plot/Parse.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ parseFigureSpec _ = return Nothing
109109
parseContent :: Block -> PlotM Script
110110
parseContent (CodeBlock (_, _, attrs) content) = do
111111
let attrs' = Map.fromList attrs
112-
mfile = unpack <$> Map.lookup (tshow FileK) attrs'
112+
mfile = normalise . unpack <$> Map.lookup (tshow FileK) attrs'
113113
when (content /= mempty && isJust mfile) $ do
114114
err $ mconcat [
115115
"Figure refers to a file (", pack $ fromJust mfile

0 commit comments

Comments
 (0)