git.iko.soy/typeable/pandoc
on master help sign in
Fixed ICML image syntax for local files.
a924a3fJohn MacFarlane
src/Text/Pandoc/Writers/ICML.hs+1−1
@@ -533,7 +533,7 @@ imageICML opts style attr _ (src, _) = do
533 hw = showFl $ ow / 2
533 hw = showFl $ ow / 2
534 hh = showFl $ oh / 2
534 hh = showFl $ oh / 2
535 scale = showFl (imgWidth / ow) ++ " 0 0 " ++ showFl (imgHeight / oh)
535 scale = showFl (imgWidth / ow) ++ " 0 0 " ++ showFl (imgHeight / oh)
536− src' = if isURI src then src else "file://." ++ pathSeparator : src
536+ src' = if isURI src then src else "file:" ++ src
537 (stlStr, attrs) = styleToStrAttr style
537 (stlStr, attrs) = styleToStrAttr style
538 props = inTags True "Properties" [] $ inTags True "PathGeometry" []
538 props = inTags True "Properties" [] $ inTags True "PathGeometry" []
539 $ inTags True "GeometryPathType" [("PathOpen","false")]
539 $ inTags True "GeometryPathType" [("PathOpen","false")]
tests/writer.icml+2−2
@@ -2563,7 +2563,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</Content>
2563 $ID/Embedded
2563 $ID/Embedded
2564 </Profile>
2564 </Profile>
2565 </Properties>
2565 </Properties>
2566− <Link Self="ueb" LinkResourceURI="file://./lalune.jpg" />
2566+ <Link Self="ueb" LinkResourceURI="file:lalune.jpg" />
2567 </Image>
2567 </Image>
2568 </Rectangle>
2568 </Rectangle>
2569 </CharacterStyleRange><Br />
2569 </CharacterStyleRange><Br />
@@ -2592,7 +2592,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</Content>
2592 $ID/Embedded
2592 $ID/Embedded
2593 </Profile>
2593 </Profile>
2594 </Properties>
2594 </Properties>
2595− <Link Self="ueb" LinkResourceURI="file://./movie.jpg" />
2595+ <Link Self="ueb" LinkResourceURI="file:movie.jpg" />
2596 </Image>
2596 </Image>
2597 </Rectangle>
2597 </Rectangle>
2598 </CharacterStyleRange>
2598 </CharacterStyleRange>