packages feed

pandoc 2.14 → 2.14.0.1

raw patch · 12 files changed

+62/−22 lines, 12 filesdep ~commonmark-extensions

Dependency ranges changed: commonmark-extensions

Files

MANUAL.txt view
@@ -1,7 +1,7 @@ --- title: Pandoc User's Guide author: John MacFarlane-date: May 28, 2021+date: May 31, 2021 ---  # Synopsis
changelog.md view
@@ -1,5 +1,24 @@ # Revision history for pandoc +## pandoc 2.14.0.1 (2021-06-01)++  * Commonmark reader: Fix regression in 2.14 with YAML metdata block parsing,+    which could cause the document body to be omitted after metadata (#7339).++  * HTML reader: fix column width regression in 2.14 (#7334).+    Column widths specified with a style attribute were off by a factor of 100.++  * Markdown reader: in `rebasePaths`, check for both Windows and Posix+    absolute paths.  Previously Windows pandoc was treating+    `/foo/bar.jpg` as non-absolute.++  * Text.Pandoc.Logging: In rendering `LoadedResource`, use relative paths.++  * Docx writer: fix regression on captions (#7328).  The "Table Caption"+    style was no longer getting applied.  (It was overwritten by "Compact.")++  * Use commonmark-extensions 0.2.1.2+ ## pandoc 2.14 (2021-05-28)    * Change reader types, allowing better tracking of source positions@@ -283,9 +302,11 @@       (#6639, Albert Krewinkel).  The zero-width non-joiner character       is used to avoid ligatures (e.g. in German). -  * ConTeXt template: List of figures before list of tables (#7235,-    Julien Dutant).+  * ConTeXt template: +    + Define `enumerate` itemgroup (#5016, Denis Maier).+    + List of figures before list of tables (#7235, Julien Dutant).+   * reveal.js template:      + Support `toc-title` (#7171, Florian Kohrt).@@ -416,6 +437,8 @@    * Command tests: fail if a file contains no tests---and fix a     test that failed in that way!++  * Use smaller images in tests, reducing the size of the source tarball by 8 MB.   ## pandoc 2.13 (2021-03-21)
man/pandoc.1 view
@@ -1,7 +1,7 @@ '\" t .\" Automatically generated by Pandoc 2.14 .\"-.TH "Pandoc User\[cq]s Guide" "" "May 28, 2021" "pandoc 2.14" ""+.TH "Pandoc User\[cq]s Guide" "" "May 31, 2021" "pandoc 2.14.0.1" "" .hy .SH NAME pandoc - general markup converter
pandoc.cabal view
@@ -1,6 +1,6 @@ cabal-version:   2.2 name:            pandoc-version:         2.14+version:         2.14.0.1 build-type:      Simple license:         GPL-2.0-or-later license-file:    COPYING.md@@ -452,7 +452,7 @@                  case-insensitive      >= 1.2      && < 1.3,                  citeproc              >= 0.4      && < 0.4.1,                  commonmark            >= 0.2      && < 0.3,-                 commonmark-extensions >= 0.2.1    && < 0.3,+                 commonmark-extensions >= 0.2.1.2  && < 0.3,                  commonmark-pandoc     >= 0.2.1    && < 0.3,                  connection            >= 0.3.1,                  containers            >= 0.4.2.1  && < 0.7,
src/Text/Pandoc/Class/PandocMonad.hs view
@@ -66,7 +66,7 @@                      unEscapeString, parseURIReference, isAllowedInURI,                      parseURI, URI(..) ) import System.FilePath ((</>), takeExtension, dropExtension,-                        isRelative, splitDirectories)+                        isRelative, splitDirectories, makeRelative) import System.Random (StdGen) import Text.Collate.Lang (Lang(..), parseLang, renderLang) import Text.Pandoc.Class.CommonState (CommonState (..))@@ -413,7 +413,7 @@              (fp', cont) <- if isRelative f                                then withPaths resourcePath readFileStrict f                                else (f,) <$> readFileStrict f-             report $ LoadedResource f fp'+             report $ LoadedResource f (makeRelative "." fp')              return (cont, mime)          httpcolon = URI{ uriScheme = "http:",                           uriAuthority = Nothing,
src/Text/Pandoc/Readers/CommonMark.hs view
@@ -30,7 +30,7 @@ import Control.Monad.Except import Data.Functor.Identity (runIdentity) import Data.Typeable-import Text.Pandoc.Parsing (runParserT, getPosition,+import Text.Pandoc.Parsing (runParserT, getInput,                             runF, defaultParserState, option, many1, anyChar,                             Sources(..), ToSources(..), ParserT, Future,                             sourceName)@@ -44,14 +44,14 @@     let sources = toSources s     let toks = concatMap sourceToToks (unSources sources)     res <- runParserT (do meta <- yamlMetaBlock (metaValueParser opts)-                          pos <- getPosition-                          return (meta, pos))+                          rest <- getInput+                          return (meta, rest))                       defaultParserState "YAML metadata" (toSources s)     case res of       Left _ -> readCommonMarkBody opts sources toks-      Right (meta, pos) -> do+      Right (meta, rest) -> do         -- strip off metadata section and parse body-        let body = dropWhile (\t -> tokPos t < pos) toks+        let body = concatMap sourceToToks (unSources rest)         Pandoc _ bs <- readCommonMarkBody opts sources body         return $ Pandoc (runF meta defaultParserState) bs   | otherwise = do
src/Text/Pandoc/Readers/HTML/Table.hs view
@@ -49,7 +49,7 @@   return $ case lookup "width" attribs of                 Nothing -> case lookup "style" attribs of                   Just (T.stripPrefix "width:" -> Just xs) | T.any (== '%') xs ->-                    maybe (Right ColWidthDefault) (Right . ColWidth)+                    maybe (Right ColWidthDefault) (Right . ColWidth . (/ 100.0))                       $ safeRead (T.filter                                    (`notElem` (" \t\r\n%'\";" :: [Char])) xs)                   _ -> Right ColWidthDefault
src/Text/Pandoc/Readers/Markdown.hs view
@@ -29,7 +29,9 @@ import Data.Text (Text) import qualified Data.Text as T import qualified Data.ByteString.Lazy as BL-import System.FilePath (addExtension, takeExtension, isAbsolute, takeDirectory)+import System.FilePath (addExtension, takeExtension, takeDirectory)+import qualified System.FilePath.Windows as Windows+import qualified System.FilePath.Posix as Posix import Text.HTML.TagSoup hiding (Row) import Text.Pandoc.Builder (Blocks, Inlines) import qualified Text.Pandoc.Builder as B@@ -1924,7 +1926,9 @@ rebasePath pos path = do   let fp = sourceName pos       isFragment = T.take 1 path == "#"-   in if T.null path || isFragment || isAbsolute (T.unpack path) || isURI path+      path' = T.unpack path+      isAbsolutePath = Posix.isAbsolute path' || Windows.isAbsolute path'+   in if T.null path || isFragment || isAbsolutePath || isURI path          then path          else            case takeDirectory fp of
src/Text/Pandoc/Writers/Docx/Table.hs view
@@ -33,7 +33,6 @@                -> WS m [Content] tableToOpenXML blocksToOpenXML gridTable = do   setFirstPara-  modify $ \s -> s { stInTable = True }   let (Grid.Table _attr caption colspecs _rowheads thead tbodies tfoot) =         gridTable   let (Caption _maybeShortCaption captionBlocks) = caption@@ -43,6 +42,9 @@                 then return []                 else withParaPropM (pStyleM "Table Caption")                      $ blocksToOpenXML captionBlocks+  -- We set "in table" after processing the caption, because we don't+  -- want the "Table Caption" style to be overwritten with "Compact".+  modify $ \s -> s { stInTable = True }   head' <- cellGridToOpenXML blocksToOpenXML HeadRow aligns thead   bodies <- mapM (cellGridToOpenXML blocksToOpenXML BodyRow aligns) tbodies   foot' <- cellGridToOpenXML blocksToOpenXML FootRow aligns tfoot
stack.yaml view
@@ -15,7 +15,7 @@ - unicode-collation-0.1.3 - citeproc-0.4 - commonmark-0.2-- commonmark-extensions-0.2.1+- commonmark-extensions-0.2.1.2 - commonmark-pandoc-0.2.1 ghc-options:    "$locals": -fhide-source-paths -Wno-missing-home-modules
test/command/3752.md view
@@ -1,9 +1,9 @@ ```-% pandoc command/chap1/text.md command/chap2/text.md -f markdown+rebase_relative_paths --verbose -t docx | pandoc -f docx -t plain+% pandoc command/chap1/text.md command/chap2/text.md -f markdown+rebase_relative_paths --verbose -t docx -o - | pandoc -f docx -t plain ^D-[INFO] Loaded command/chap1/spider.png from ./command/chap1/spider.png-[INFO] Loaded command/chap2/spider.png from ./command/chap2/spider.png-[INFO] Loaded command/chap1/../../lalune.jpg from ./command/chap1/../../lalune.jpg+[INFO] Loaded command/chap1/spider.png from command/chap1/spider.png+[INFO] Loaded command/chap2/spider.png from command/chap2/spider.png+[INFO] Loaded command/chap1/../../lalune.jpg from command/chap1/../../lalune.jpg Chapter one  A spider: [spider]
+ test/command/7339.md view
@@ -0,0 +1,11 @@+```+% pandoc -f gfm -s -t native+---+title: Test+---++Hi+^D+Pandoc (Meta {unMeta = fromList [("title",MetaInlines [Str "Test"])]})+[Para [Str "Hi"]]+```