markdown2svg 0.0.1.26 → 0.0.1.27
raw patch · 2 files changed
+7/−1 lines, 2 files
Files
- markdown2svg.cabal +1/−1
- src/SVG.hs +6/−0
markdown2svg.cabal view
@@ -2,7 +2,7 @@ cabal-version: >=1.8 name: markdown2svg-version: 0.0.1.26+version: 0.0.1.27 stability: Experimental author: Yoshikuni Jujo <PAF01143@nifty.ne.jp> maintainer: Yoshikuni Jujo <PAF01143@nifty.ne.jp>
src/SVG.hs view
@@ -67,6 +67,12 @@ textToSVGData :: Fonts -> [(FilePath, String)] -> Double -> Double -> [Text] -> [[SVG]] textToSVGData fs@(hf, nf, cf) fp r h [] = [[]]+textToSVGData fs@(hf, nf, cf) fp r h (Header n s : ts@(List l : _))+ | h' > bottomBorder r = [] : (ln : one') : rest'+ where+ (_, h', _) = listToSVGData nf 1 "*+-------" r (h + headerSep n r * 5 / 4 + 100 * r) (listLeftMargin r) l+ ln = Text (TopLeft (leftMargin r) (topMargin r + headerSep n r)) (header n r) (ColorName "black") hf s+ one' : rest' = textToSVGData fs fp r (topMargin r + headerSep n r * 5 / 4) ts textToSVGData fs@(hf, nf, cf) fp r h (Header n s : ts@(Paras (p : _) : _)) | h' > bottomBorder r = [] : (l : one') : rest' where