pandoc 2.11 → 2.11.0.1
raw patch · 15 files changed
+322/−97 lines, 15 filesdep ~citeprocPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: citeproc
API changes (from Hackage documentation)
Files
- MANUAL.txt +7/−7
- cabal.project +5/−0
- changelog.md +59/−23
- data/templates/default.latex +2/−3
- man/pandoc.1 +10/−10
- pandoc.cabal +2/−2
- src/Text/Pandoc/Readers/CommonMark.hs +22/−21
- src/Text/Pandoc/Readers/LaTeX.hs +10/−0
- src/Text/Pandoc/Writers/LaTeX.hs +6/−4
- src/Text/Pandoc/Writers/Markdown.hs +23/−24
- stack.yaml +1/−1
- test/command/6739.md +21/−0
- test/command/6740.md +7/−0
- test/command/6741.md +145/−0
- test/command/pandoc-citeproc-chicago-author-date.md +2/−2
MANUAL.txt view
@@ -594,7 +594,7 @@ `-L` *SCRIPT*, `--lua-filter=`*SCRIPT* : Transform the document in a similar fashion as JSON filters (see- `--filter`), but use pandoc's build-in Lua filtering system. The given+ `--filter`), but use pandoc's built-in Lua filtering system. The given Lua script is expected to return a list of Lua filters which will be applied in order. Each Lua filter must contain element-transforming functions indexed by the name of the AST element on which the filter@@ -2994,7 +2994,7 @@ In the `ipynb` input format, this causes Markdown cells to be included as raw Markdown blocks (allowing lossless round-tripping) rather than being parsed. Use this only-when you are targetting `ipynb` or a markdown-based+when you are targeting `ipynb` or a markdown-based output format. #### Extension: `citations` {#org-citations}@@ -5147,14 +5147,14 @@ Note that `pandoc` can be used to produce such a YAML metadata section from a BibTeX, BibLaTeX, or CSL JSON bibliography: - pandoc chem.bib -s -t markdown- pandoc chem.json -s -t markdown+ pandoc chem.bib -s -f biblatex -t markdown+ pandoc chem.json -s -f csljson -t markdown `pandoc` can also be used to produce CSL JSON bibliography from BibTeX, BibLaTeX, or markdown YAML: - pandoc chem.bib -s -t csljson- pandoc chem.yaml -s -t csljson+ pandoc chem.bib -s -f biblatex -t csljson+ pandoc chem.yaml -s -f markdown -t csljson Running pandoc on a bibliography file with the `--citeproc` option will create a formatted bibliography in the format@@ -5265,7 +5265,7 @@ This feature allows stylesheets to be customized to give different output for different output formats. However,-stylesheets customized in this way will not be useable+stylesheets customized in this way will not be usable by other CSL implementations.
cabal.project view
@@ -3,3 +3,8 @@ package pandoc flags: +embed_data_files -trypandoc ghc-options: -j +RTS -A64m -RTS++source-repository-package+ type: git+ location: https://github.com/jgm/citeproc+ tag: 0.1.0.1
changelog.md view
@@ -1,5 +1,41 @@ # Revision history for pandoc +## pandoc 2.11.0.1 (2020-10-13)++ * LaTeX reader: support more acronym commands (#6746):+ `\acl`, `\aclp`, and capitalized versions of already+ supported commands.++ * Commonmark reader: add `pipe_table` extension *after* defaults (#6739).+ Otherwise we get bad results for non-table, non-paragraph+ lines containing pipe characters.++ * Markdown writer: Fix autolinks rendering for gfm (#6740).+ Previously, autolinks rendered as raw HTML, due to the+ `class="uri"` added by pandoc's markdown reader.++ * LaTeX writer:++ + Escape option values in lstlistings environment (#6742).+ + Fix handling of `lang` `pt-BR` (#2953). For polyglossia we now+ use `\setmainlanguage[variant=brazilian]{portuguese}` and for babel+ `\usepackage[shorthands=off,main=brazilian]{babel}`.++ * Depend on latest citeproc (0.1.0.1).++ + This fixes the citation number issue with ieee.csl and other+ styles that do not explicitly sort bibliographies (#6741). (Pandoc+ was numbering them by their order in the bibliography file,+ rather than the order cited, as required by the CSL spec.)+ + Fixes groupin/collapsing with citation items with prefixes.++ * default.latex: fix `CSLReference` macro definition.++ * Fix MANUAL.txt CSL JSON conversion examples.++ * Fix spelling errors in chengelog, MANUAL.txt, `doc/org.md` (#6738).++ ## pandoc 2.11 (2020-10-11) * Add `--citeproc` (`-C`) option to trigger built-in citation processing.@@ -267,8 +303,8 @@ * Add data files needed for Text.Pandoc.Citeproc: these include `default.csl` in the data directory and a `citeproc` directory that is only used at compile-time for biblatex localizations. Note that we've- added `file-embed` as a mandatory rather than a conditional depedency,- because of the biblatex localization files.+ added `file-embed` as a mandatory rather than a conditional+ dependency, because of the biblatex localization files. * Lua filters: @@ -505,7 +541,7 @@ * Ms writer: + Fix code highlighting with blank lines. Previously blank lines- were simply omitted from highligted code.+ were simply omitted from highlighted code. + Escape starting periods in ms writer code blocks (#6505, Michael Hoffmann). If a line of ms code block output starts with a period (.), it should be prepended by `\&` so that it is not interpreted as a roff@@ -968,7 +1004,7 @@ * Make it possible to compile using Stack on NixOS (#6439, Mathieu Boespflug). - * CI action to check for commit messsage length (Nikolay Yakimov, #6398).+ * CI action to check for commit message length (Nikolay Yakimov, #6398). ## pandoc 2.9.2.1 (2020-03-23)@@ -1535,7 +1571,7 @@ The main impact of this change is better reflowing of content interpolated into templates. Previously, interpolated variables were rendered independently and- intepolated as strings, which could lead to overly long+ interpolated as strings, which could lead to overly long lines. Now the templates interpolated as Doc values which may include breaking spaces, and reflowing occurs after template interpolation rather than before.@@ -2014,7 +2050,7 @@ a margin and font size according to their level. Furthermore this commit allows changing the font with which code is formatted via the `monofont` option.- + Start numbering at appopriate numbers (Jesse Rosenthal, #5709).+ + Start numbering at appropriate numbers (Jesse Rosenthal, #5709). Starting numbers for ordered lists were previously ignored. Now we specify the number if it is something other than 1. @@ -3465,7 +3501,7 @@ + Set default listings language for lua, assembler (#5227, John MacFarlane). Otherwise we get an error when trying to compile code with lua or assembler code. To change the default dialect- (currenty 5.3 for lua and x86masm for assembler), you can use+ (currently 5.3 for lua and x86masm for assembler), you can use `--include-in-header` to inject something like `\lstset{defaultdialect=[5.2]Lua}`. @@ -7162,7 +7198,7 @@ * Removed `hard_line_breaks` extension from `markdown_github` (#3594). GitHub has two Markdown modes, one for long-form documents like READMEs- and one for short things like issue coments. In issue comments, a line+ and one for short things like issue comments. In issue comments, a line break is treated as a hard line break. In README, wikis, etc., it is treated as a space as in regular Markdown. Since pandoc is more likely to be used to convert long-form documents from GitHub Markdown,@@ -7515,7 +7551,7 @@ top-level `Text.Pandoc` module. + Changed `StringWriter` -> `TextWriter`.- + `getWriter` now retuns a pair of a reader and+ + `getWriter` now returns a pair of a reader and `Extensions`, instead of building the extensions into the reader (#3659). The calling code must explicitly set `readerExtensions` using the `Extensions` returned. The@@ -8467,7 +8503,7 @@ + Use `unicode-math` (Vaclav Haisman). Use `mathspec` with only XeLaTeX on request. + Don't load `fontspec` before `unicode-math` (over there).- The `unicode-math` package loads `fontspec` so explict loading of+ The `unicode-math` package loads `fontspec` so explicit loading of `fontspec` before `unicode-math` is not necessary. + Use `unicode-math` by default in default.latex template. mathspec will be used in xelatex if the `mathspec` variable is set; otherwise@@ -9148,7 +9184,7 @@ is now used in parsing RST and Markdown line blocks, DocBook `linegroup`/`line` combinations, and Org-mode `VERSE` blocks. Previously `Para` blocks with hard linebreaks were used. `LineBlock`s- are handled specially in the following ouput formats: AsciiDoc+ are handled specially in the following output formats: AsciiDoc (as `[verse]` blocks), ConTeXt (`\startlines`/`\endlines`), HTML (`div` with a style), Markdown (line blocks if `line_blocks` is enabled), Org-mode (`VERSE` blocks), RST (line blocks). In@@ -9295,7 +9331,7 @@ comma-separated list. + Give precedence to later meta lines. The last meta-line of any given type is the significant line. Previously the value of the first line- was kept, even if more lines of the same type were encounterd.+ was kept, even if more lines of the same type were encountered. + Read LaTeX_header as header-includes. LaTeX-specific header commands can be defined in `#+LaTeX_header` lines. They are parsed as format-specific inlines to ensure that they will only show up in LaTeX@@ -9343,7 +9379,7 @@ be able to figure out internal links to a header in a docx if the anchor span was empty. We change that to read the inlines out of the first anchor span in a header.- + Let headers use exisiting id. Previously we always generated an id for+ + Let headers use existing id. Previously we always generated an id for headers (since they wouldn't bring one from Docx). Now we let it use an existing one if possible. This should allow us to recurs through anchor spans.@@ -9922,7 +9958,7 @@ character. Empty rows where parsed as alignment rows and dropped from the output. + Fix spacing after LaTeX-style symbols.- The org-reader was droping space after unescaped LaTeX-style symbol+ The org-reader was dropping space after unescaped LaTeX-style symbol commands: `\ForAll \Auml` resulted in `∀Ä` but should give `∀ Ä` instead. This seems to be because the LaTeX-reader treats the command-terminating space as part of the command. Dropping the trailing@@ -10257,7 +10293,7 @@ * Entity handling fixes: improved handling of entities like `⟨` that require a trailing semicolon. Allow uppercase- `x` in numerical hexidecimal character references, working+ `x` in numerical hexadecimal character references, working around a tagsoup bug. * `stack.yaml` - use lts-4.0, but with older aeson to avoid excessive@@ -11742,7 +11778,7 @@ * `Text.Pandoc.Shared`: + Make safeRead safe (#1801, Matthew Pickering).- + Addded `mapLeft`, `hush` (Matthew Pickering).+ + Added `mapLeft`, `hush` (Matthew Pickering). * `Text.Pandoc.Pretty`: @@ -11810,7 +11846,7 @@ + Use `text:p` instead of `text:h` for title. Using `text:h` causes problems with numbering. Closes #2059.- Thansk to @nkalvi for diagnosing this.+ Thanks to @nkalvi for diagnosing this. * reveal.js template: @@ -12076,7 +12112,7 @@ * RST writer: + Ensure blank line after figure.- + Avoid exces whitespace after last list item (#1777).+ + Avoid excess whitespace after last list item (#1777). + Wrap line blocks with spaces before continuations (#1656). + Fixed double-rendering of footnotes in RST tables (#1769). @@ -12138,7 +12174,7 @@ + Renumber header and footer relationships to avoid collisions (Jesse Rosenthal). We previously took the old relationship names of the headers and footer in secptr. That led to collisions. We now make- a map of availabl names in the relationships file, and then rename+ a map of available names in the relationships file, and then rename in secptr. * ConTeXt writer:@@ -12861,7 +12897,7 @@ different versions of the `directory` library. + Added `Text.Pandoc.Compat.Except` to allow building against- different verions of `mtl`.+ different versions of `mtl`. * Code cleanup in some writers, using Reader monad to avoid passing options parameter around (Matej Kollar).@@ -14500,7 +14536,7 @@ + Include HTML TOC, even in epub2. The TOC is included in `<spine>`, but `linear` is set to `no` unless the `--toc` option is specified. Include `<guide>` element in OPF. This should allow the TOC to- be useable in Kindles when converted with kindlegen. Closes #773.+ be usable in Kindles when converted with kindlegen. Closes #773. * `Text.Pandoc.Parsing`: Optimized `oneOfStringsCI`. This dramatically reduces the speed penalty that comes from enabling the@@ -15096,7 +15132,7 @@ be a parenthesized emphasized "hello". The new list is taken from the PHP source of textile 2.4. + Fixed autolinks. Previously the textile reader and writer- incorrectly implented RST-style autolinks for URLs and email+ incorrectly implemented RST-style autolinks for URLs and email addresses. This has been fixed. Now an autolink is done this way: `"$":http://myurl.com`. + Fixed footnotes bug in textile. This affected notes occurring@@ -16159,7 +16195,7 @@ Items are no longer installed as root. Man pages are zipped and given proper permissions. - * Modified windows installer generater to use cabal-dev.+ * Modified windows installer generator to use cabal-dev. * Setup: Making man pages now works with cabal-dev (at least on OSX). In Setup.hs we now invoke 'runghc' in a way that points it to the correct
data/templates/default.latex view
@@ -370,15 +370,14 @@ \setlength{\cslhangindent}{1.5em} \newlength{\csllabelwidth} \setlength{\csllabelwidth}{3em}-\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry sp+\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry spacing {% don't indent paragraphs \setlength{\parindent}{0pt} % turn on hanging indent if param 1 is 1 \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi- % set line spacing % set entry spacing \ifnum #2 > 0- \setlength{\parskip}{#3\baselineskip}+ \setlength{\parskip}{#2\baselineskip} \fi }% {}
man/pandoc.1 view
@@ -1,7 +1,7 @@ .\"t-.\" Automatically generated by Pandoc 2.11+.\" Automatically generated by Pandoc 2.11.0.1 .\"-.TH "Pandoc User\[cq]s Guide" "" "July 23, 2020" "pandoc 2.11" ""+.TH "Pandoc User\[cq]s Guide" "" "July 23, 2020" "pandoc 2.11.0.1" "" .hy .SH NAME pandoc - general markup converter@@ -629,7 +629,7 @@ .TP \f[B]\f[CB]-L\f[B]\f[R] \f[I]SCRIPT\f[R], \f[B]\f[CB]--lua-filter=\f[B]\f[R]\f[I]SCRIPT\f[R] Transform the document in a similar fashion as JSON filters (see-\f[C]--filter\f[R]), but use pandoc\[cq]s build-in Lua filtering system.+\f[C]--filter\f[R]), but use pandoc\[cq]s built-in Lua filtering system. The given Lua script is expected to return a list of Lua filters which will be applied in order. Each Lua filter must contain element-transforming functions indexed by@@ -3359,8 +3359,8 @@ In the \f[C]ipynb\f[R] input format, this causes Markdown cells to be included as raw Markdown blocks (allowing lossless round-tripping) rather than being parsed.-Use this only when you are targetting \f[C]ipynb\f[R] or a-markdown-based output format.+Use this only when you are targeting \f[C]ipynb\f[R] or a markdown-based+output format. .SS Extension: \f[C]citations\f[R] .PP Some aspects of Pandoc\[cq]s Markdown citation syntax are also accepted@@ -6048,8 +6048,8 @@ .IP .nf \f[C]-pandoc chem.bib -s -t markdown-pandoc chem.json -s -t markdown+pandoc chem.bib -s -f biblatex -t markdown+pandoc chem.json -s -f csljson -t markdown \f[R] .fi .PP@@ -6058,8 +6058,8 @@ .IP .nf \f[C]-pandoc chem.bib -s -t csljson-pandoc chem.yaml -s -t csljson+pandoc chem.bib -s -f biblatex -t csljson+pandoc chem.yaml -s -f markdown -t csljson \f[R] .fi .PP@@ -6204,7 +6204,7 @@ .PP This feature allows stylesheets to be customized to give different output for different output formats.-However, stylesheets customized in this way will not be useable by other+However, stylesheets customized in this way will not be usable by other CSL implementations. .SS Placement of the bibliography .PP
pandoc.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: pandoc-version: 2.11+version: 2.11.0.1 build-type: Simple license: GPL-2.0-or-later license-file: COPYING.md@@ -404,7 +404,7 @@ blaze-markup >= 0.8 && < 0.9, bytestring >= 0.9 && < 0.12, case-insensitive >= 1.2 && < 1.3,- citeproc >= 0.1 && < 0.2,+ citeproc >= 0.1.0.1 && < 0.2, commonmark >= 0.1.0.2 && < 0.2, commonmark-extensions >= 0.2 && < 0.3, commonmark-pandoc >= 0.2 && < 0.3,
src/Text/Pandoc/Readers/CommonMark.hs view
@@ -32,34 +32,35 @@ readCommonMark :: PandocMonad m => ReaderOptions -> Text -> m Pandoc readCommonMark opts s = do let res = runIdentity $- commonmarkWith (foldr (<>) defaultSyntaxSpec exts) "input" s+ commonmarkWith (foldr ($) defaultSyntaxSpec exts) "input" s case res of Left err -> throwError $ PandocParsecError s err Right (Cm bls :: Cm () Blocks) -> return $ B.doc bls where- exts = [ hardLineBreaksSpec | isEnabled Ext_hard_line_breaks opts ] ++- [ smartPunctuationSpec | isEnabled Ext_smart opts ] ++- [ strikethroughSpec | isEnabled Ext_strikeout opts ] ++- [ superscriptSpec | isEnabled Ext_superscript opts ] ++- [ subscriptSpec | isEnabled Ext_subscript opts ] ++- [ mathSpec | isEnabled Ext_tex_math_dollars opts ] ++- [ fancyListSpec | isEnabled Ext_fancy_lists opts ] ++- [ fencedDivSpec | isEnabled Ext_fenced_divs opts ] ++- [ bracketedSpanSpec | isEnabled Ext_bracketed_spans opts ] ++- [ rawAttributeSpec | isEnabled Ext_raw_attribute opts ] ++- [ attributesSpec | isEnabled Ext_attributes opts ] ++- [ pipeTableSpec | isEnabled Ext_pipe_tables opts ] ++- [ autolinkSpec | isEnabled Ext_autolink_bare_uris opts ] ++- [ emojiSpec | isEnabled Ext_emoji opts ] ++- [ autoIdentifiersSpec+ exts = [ (hardLineBreaksSpec <>) | isEnabled Ext_hard_line_breaks opts ] +++ [ (smartPunctuationSpec <>) | isEnabled Ext_smart opts ] +++ [ (strikethroughSpec <>) | isEnabled Ext_strikeout opts ] +++ [ (superscriptSpec <>) | isEnabled Ext_superscript opts ] +++ [ (subscriptSpec <>) | isEnabled Ext_subscript opts ] +++ [ (mathSpec <>) | isEnabled Ext_tex_math_dollars opts ] +++ [ (fancyListSpec <>) | isEnabled Ext_fancy_lists opts ] +++ [ (fencedDivSpec <>) | isEnabled Ext_fenced_divs opts ] +++ [ (bracketedSpanSpec <>) | isEnabled Ext_bracketed_spans opts ] +++ [ (rawAttributeSpec <>) | isEnabled Ext_raw_attribute opts ] +++ [ (attributesSpec <>) | isEnabled Ext_attributes opts ] +++ [ (<> pipeTableSpec) | isEnabled Ext_pipe_tables opts ] +++ -- see #6739+ [ (autolinkSpec <>) | isEnabled Ext_autolink_bare_uris opts ] +++ [ (emojiSpec <>) | isEnabled Ext_emoji opts ] +++ [ (autoIdentifiersSpec <>) | isEnabled Ext_gfm_auto_identifiers opts , not (isEnabled Ext_ascii_identifiers opts) ] ++- [ autoIdentifiersAsciiSpec+ [ (autoIdentifiersAsciiSpec <>) | isEnabled Ext_gfm_auto_identifiers opts , isEnabled Ext_ascii_identifiers opts ] ++- [ implicitHeadingReferencesSpec+ [ (implicitHeadingReferencesSpec <>) | isEnabled Ext_implicit_header_references opts ] ++- [ footnoteSpec | isEnabled Ext_footnotes opts ] ++- [ definitionListSpec | isEnabled Ext_definition_lists opts ] ++- [ taskListSpec | isEnabled Ext_task_lists opts ]+ [ (footnoteSpec <>) | isEnabled Ext_footnotes opts ] +++ [ (definitionListSpec <>) | isEnabled Ext_definition_lists opts ] +++ [ (taskListSpec <>) | isEnabled Ext_task_lists opts ]
src/Text/Pandoc/Readers/LaTeX.hs view
@@ -875,9 +875,19 @@ , ("ac", doAcronym "short") , ("acf", doAcronym "full") , ("acs", doAcronym "abbrv")+ , ("acl", doAcronym "long") , ("acp", doAcronymPlural "short") , ("acfp", doAcronymPlural "full") , ("acsp", doAcronymPlural "abbrv")+ , ("aclp", doAcronymPlural "long")+ , ("Ac", doAcronym "short")+ , ("Acf", doAcronym "full")+ , ("Acs", doAcronym "abbrv")+ , ("Acl", doAcronym "long")+ , ("Acp", doAcronymPlural "short")+ , ("Acfp", doAcronymPlural "full")+ , ("Acsp", doAcronymPlural "abbrv")+ , ("Aclp", doAcronymPlural "long") -- siuntix , ("si", skipopts *> dosi tok) , ("SI", doSI tok)
src/Text/Pandoc/Writers/LaTeX.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE TupleSections #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-}@@ -635,6 +636,8 @@ let listingsCodeBlock = do st <- get ref <- toLabel identifier+ kvs <- mapM (\(k,v) -> (k,) <$>+ stringToLaTeX TextString v) keyvalAttr let params = if writerListings (stOptions st) then (case getListingsLanguage classes of Just l -> [ "language=" <> mbBraced l ]@@ -645,7 +648,7 @@ [ (if key == "startFrom" then "firstnumber" else key) <> "=" <> mbBraced attr |- (key,attr) <- keyvalAttr,+ (key,attr) <- kvs, key `notElem` ["exports", "tangle", "results"] -- see #4889 ] ++@@ -1635,6 +1638,7 @@ toPolyglossia (Lang "hsb" _ _ _) = ("usorbian", "") toPolyglossia (Lang "la" _ _ vars) | "x-classic" `elem` vars = ("latin", "variant=classic")+toPolyglossia (Lang "pt" _ "BR" _) = ("portuguese", "variant=brazilian") toPolyglossia (Lang "sl" _ _ _) = ("slovenian", "") toPolyglossia x = (commonFromBcp47 x, "") @@ -1669,6 +1673,7 @@ toBabel (Lang "hsb" _ _ _) = "uppersorbian" toBabel (Lang "la" _ _ vars) | "x-classic" `elem` vars = "classiclatin"+toBabel (Lang "pt" _ "BR" _) = "brazilian" toBabel (Lang "sl" _ _ _) = "slovene" toBabel x = commonFromBcp47 x @@ -1676,9 +1681,6 @@ -- and converts it to a string shared by Babel and Polyglossia. -- https://tools.ietf.org/html/bcp47#section-2.1 commonFromBcp47 :: Lang -> Text-commonFromBcp47 (Lang "pt" _ "BR" _) = "brazil"--- Note: documentation says "brazilian" works too, but it doesn't seem to work--- on some systems. See #2953. commonFromBcp47 (Lang "sr" "Cyrl" _ _) = "serbianc" commonFromBcp47 (Lang "zh" "Latn" _ vars) | "pinyin" `elem` vars = "pinyin"
src/Text/Pandoc/Writers/Markdown.hs view
@@ -1296,13 +1296,7 @@ return $ pdoc <+> r modekey SuppressAuthor = "-" modekey _ = ""-inlineToMarkdown opts lnk@(Link attr txt (src, tit))- | isEnabled Ext_raw_html opts &&- not (isEnabled Ext_link_attributes opts) &&- attr /= nullAttr = -- use raw HTML- literal . T.strip <$>- writeHtml5String opts{ writerTemplate = Nothing } (Pandoc nullMeta [Plain [lnk]])- | otherwise = do+inlineToMarkdown opts lnk@(Link attr txt (src, tit)) = do variant <- asks envVariant linktext <- inlineListToMarkdown opts txt let linktitle = if T.null tit@@ -1320,23 +1314,28 @@ reftext <- if useRefLinks then literal <$> getReference attr linktext (src, tit) else return mempty- return $ if useAuto- then case variant of- PlainText -> literal srcSuffix- _ -> "<" <> literal srcSuffix <> ">"- else if useRefLinks- then let first = "[" <> linktext <> "]"- second = if getKey linktext == getKey reftext- then if useShortcutRefLinks- then ""- else "[]"- else "[" <> reftext <> "]"- in first <> second- else case variant of- PlainText -> linktext- _ -> "[" <> linktext <> "](" <>- literal src <> linktitle <> ")" <>- linkAttributes opts attr+ case variant of+ PlainText+ | useAuto -> return $ literal srcSuffix+ | otherwise -> return linktext+ _ | useAuto -> return $ "<" <> literal srcSuffix <> ">"+ | useRefLinks ->+ let first = "[" <> linktext <> "]"+ second = if getKey linktext == getKey reftext+ then if useShortcutRefLinks+ then ""+ else "[]"+ else "[" <> reftext <> "]"+ in return $ first <> second+ | isEnabled Ext_raw_html opts+ , not (isEnabled Ext_link_attributes opts)+ , attr /= nullAttr -> -- use raw HTML to render attributes+ literal . T.strip <$>+ writeHtml5String opts{ writerTemplate = Nothing }+ (Pandoc nullMeta [Plain [lnk]])+ | otherwise -> return $+ "[" <> linktext <> "](" <> literal src <> linktitle <> ")" <>+ linkAttributes opts attr inlineToMarkdown opts img@(Image attr alternate (source, tit)) | isEnabled Ext_raw_html opts && not (isEnabled Ext_link_attributes opts) &&
stack.yaml view
@@ -6,7 +6,6 @@ packages: - '.' extra-deps:-- citeproc-0.1 - pandoc-types-1.22 - texmath-0.12.0.3 - rfc5051-0.2@@ -23,6 +22,7 @@ - commonmark-0.1.0.2 - commonmark-extensions-0.2.0.1 - commonmark-pandoc-0.2.0.1+- citeproc-0.1.0.1 ghc-options: "$locals": -fhide-source-paths -Wno-missing-home-modules
+ test/command/6739.md view
@@ -0,0 +1,21 @@+```+% pandoc -f gfm+* `--argument` This item does not have a pipe character+* `--argA | --argB` This item has a pipe character+^D+<ul>+<li><code>--argument</code> This item does not have a pipe character</li>+<li><code>--argA | --argB</code> This item has a pipe character</li>+</ul>+```++```+% pandoc --mathjax -f gfm+tex_math_dollars+* $|x|$+* $|y|$+^D+<ul>+<li><span class="math inline">\(|x|\)</span></li>+<li><span class="math inline">\(|y|\)</span></li>+</ul>+```
+ test/command/6740.md view
@@ -0,0 +1,7 @@+```+% pandoc -t gfm+<https://www.google.com>+^D+<https://www.google.com>+```+
+ test/command/6741.md view
@@ -0,0 +1,145 @@+```+% pandoc --citeproc --csl command/ieee.csl -t plain+---+title: 'A Simple Citations Test'+author: 'Joanna Doe'+references:+- author:+ - family: Mathôt+ given: S+ container-title: Annual review of vision science+ DOI: 10.1146/annurev-vision-030320-062352+ id: mathot2020+ issued: 2020+ title: "Tuning the senses: How the pupil shapes vision at the earliest+ stage."+ title-short: Tuning the senses+ type: article-journal+- author:+ - family: Zokaei+ given: Nahid+ - family: Board+ given: Alexander G.+ - family: Manohar+ given: Sanjay G.+ - family: Nobre+ given: Anna C.+ container-title: Proceedings of the National Academy of Sciences of+ the United States of America+ DOI: 10.1073/pnas.1909959116+ id: zokaei2019+ issued: 2019+ page: 201909959+ title: Modulation of the pupillary response by the content of visual+ working memory+ type: article-journal+- author:+ - family: Suzuki+ given: Y+ - family: Minami+ given: T+ - family: Laeng+ given: B+ - family: Nakauchi+ given: S+ container-title: Acta Psychologica+ DOI: 10.1016/j.actpsy.2019.102882+ id: suzuki2019+ issued: 2019+ page: 102882+ title: "Colorful glares: Effects of colors on brightness illusions+ measured with pupillometry."+ title-short: Colorful glares+ type: article-journal+ volume: 198+- author:+ - family: Brainard+ given: David H.+ - family: Hurlbert+ given: Anya+ container-title: Current Biology+ DOI: 10.1016/j.cub.2015.05.020+ id: brainard2015a+ issue: 13+ issued: 2015+ page: R551-R554+ title: "Colour vision: Understanding \\#TheDress"+ title-short: Colour vision+ type: article-journal+ volume: 25+- author:+ - family: Cavanagh+ given: Patrick+ container-title: Limits of vision+ editor:+ - family: Crody-Dillon+ given: John R.+ id: cavanagh1991+ issued: 1991+ page: 234-250+ publisher: CRC Press+ title: Vision at equiluminance+ type: chapter+- author:+ - family: Brainard+ given: David H.+ container-title: Annual Review of Vision Science+ DOI: 10.1146/annurev-vision-082114-035341+ id: brainard2015+ issued: 2015+ page: 519-546+ title: Color and the cone mosaic+ type: article-journal+ volume: 1+...++# First Heading #+Here is some **text**. And a reference [@brainard2015;@brainard2015a].++# Second Heading #+Here is some *text*[@cavanagh1991]. And a reference [@cavanagh1991;@brainard2015].++# Third Heading #+Here is some [text]{.underline}. And a reference [@mathot2020;@zokaei2019;@suzuki2019].++::: {#refs}+## Bibliography ##+:::+^D+First Heading++Here is some text. And a reference [1], [2].++Second Heading++Here is some text[3]. And a reference [1], [3].++Third Heading++Here is some text. And a reference [4]–[6].++Bibliography++[1] D. H. Brainard, “Color and the cone mosaic,” Annual Review of Vision+Science, vol. 1, pp. 519–546, 2015.++[2] D. H. Brainard and A. Hurlbert, “Colour vision: Understanding+#TheDress,” Current Biology, vol. 25, no. 13, pp. R551–R554, 2015.++[3] P. Cavanagh, “Vision at equiluminance,” in Limits of vision, J. R.+Crody-Dillon, Ed. CRC Press, 1991, pp. 234–250.++[4] S. Mathôt, “Tuning the senses: How the pupil shapes vision at the+earliest stage.” Annual review of vision science, 2020.++[5] N. Zokaei, A. G. Board, S. G. Manohar, and A. C. Nobre, “Modulation+of the pupillary response by the content of visual working memory,”+Proceedings of the National Academy of Sciences of the United States of+America, p. 201909959, 2019.++[6] Y. Suzuki, T. Minami, B. Laeng, and S. Nakauchi, “Colorful glares:+Effects of colors on brightness illusions measured with pupillometry.”+Acta Psychologica, vol. 198, p. 102882, 2019.++```+
test/command/pandoc-citeproc-chicago-author-date.md view
@@ -103,8 +103,8 @@ [^1]: [Doe and Roe](#ref-пункт3) ([2007, 12](#ref-пункт3)) and a citation without locators ([Doe and Roe 2007](#ref-пункт3)). -[^2]: Some citations (see [Doe 2005, chap. 3](#ref-item1); [Doe and Roe- 2007](#ref-пункт3); [Doe 2006](#ref-item2)).+[^2]: Some citations (see [Doe 2005, chap. 3](#ref-item1);+ [2006](#ref-item2); [Doe and Roe 2007](#ref-пункт3)). [^3]: Like a citation without author: ([2005](#ref-item1)), and now Doe with a locator ([2006, 44](#ref-item2)).