publish 2.1.6 → 2.2.2
raw patch · 3 files changed
+19/−8 lines, 3 files
Files
- publish.cabal +5/−4
- src/PandocToMarkdown.hs +13/−2
- src/RenderDocument.hs +1/−2
publish.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack ----- hash: aef6f603b6208e83923b38b0844890f9251c6b38c650d7bb264a4e66083493ad+-- hash: a4cc52f72afe6fb6f773a9c3b2fc7579f2146eb3a1367a22926f2c3519f6f897 name: publish-version: 2.1.6+version: 2.2.2 synopsis: Publishing tools for papers, books, and presentations description: Tools for rendering markdown-centric documents into PDFs. .@@ -24,7 +24,8 @@ copyright: © 2016-2021 Athae Eredh Siniath and Others license: MIT license-file: LICENSE-tested-with: GHC == 8.10+tested-with:+ GHC == 8.10 build-type: Simple source-repository head
src/PandocToMarkdown.hs view
@@ -372,9 +372,20 @@ -} stringToMarkdown :: T.Text -> Rope stringToMarkdown =- mconcat . intersperse "\\ " . breakPieces isNonBreaking . intoRope+ escapeSpecialWith '\x00a0' ' '+ . escapeSpecial '['+ . escapeSpecial ']'+ . escapeSpecial '_'+ . intoRope++escapeSpecial :: Char -> Rope -> Rope+escapeSpecial c = escapeSpecialWith c c++escapeSpecialWith :: Char -> Char -> Rope -> Rope+escapeSpecialWith needle replacement =+ mconcat . intersperse (singletonRope '\\' <> singletonRope replacement) . breakPieces isNeedle . intoRope where- isNonBreaking c = c == '\x00a0'+ isNeedle c = c == needle imageToMarkdown :: Attr -> [Inline] -> (T.Text, T.Text) -> Rope imageToMarkdown attr inlines (url, title) =
src/RenderDocument.hs view
@@ -70,11 +70,10 @@ void (renderDocument (mode, copy) bookfile) Cycle -> do -- use inotify to rebuild on changes- forever (renderDocument (mode, copy) bookfile >>= waitForChange)+ forever (renderDocument (mode, copy) bookfile >>= waitForChange >> resetTimer) renderDocument :: (Mode, Copy) -> FilePath -> Program Env [FilePath] renderDocument (mode, copy) file = do- resetTimer event "Read .book file" book <- processBookFile file