在 Haskell 代码中使用 --shift-heading-level-by=-1

发布于 2025-01-10 05:23:55 字数 379 浏览 3 评论 0原文

我想在用 Haskell 编写的程序中使用 pandoc 扩展 --shift-heading-level-by 。我在文档中搜索了阅读器选项和扩展(版本 2.17.1.1),但找不到任何具有此效果的内容。通常,pandoc扩展会在扩展中列出,并且可以从Haskell代码中访问。

我可以按照 问题 中给出的示例编写一个过滤器,但是如果可能的话,我更愿意避免重复代码。所以: --shift-heading-level-by 扩展的名称是什么?它是在哪个版本中引入的?

I would like to use the pandoc extension --shift-heading-level-by in a program written in Haskell. I searched the documentation for reader options and extensions (for version 2.17.1.1), but cannot find anything to have this effect. Usually, pandoc extensions are listed in the extensions and can be accessed from Haskell code.

I could write a filter, following the example given in question but I prefere to avoid duplication of code, if ever possible. Therefore:
What is the name of the extension for --shift-heading-level-by and in which version is it introduced?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

永言不败 2025-01-17 05:23:55

该函数名为 Text.Pandoc.Shared.headerShift,在 pandoc 1.6 中引入。每当 --shift-heading-level-by 作为参数传递时都会应用它。

The function that is named Text.Pandoc.Shared.headerShift and was introduced in pandoc 1.6. It is applied whenever --shift-heading-level-by is passed as an argument.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文