【发布时间】:2021-03-12 11:11:19
【问题描述】:
我正在尝试找到一个很好的解决方案,以便在 Markdown 中编写我的电子邮件,并在 Thunderbird 中为一般消费设置样式。
我之前的解决方案,插件Markdown-here 没有维护,并且不再适用于最新的 Thunderbird 版本。
我尝试成功的一种方法是使用 pandoc,并通过 Insert->HTML 插入 HTML 文件的内容。
例如:
email.md
Hi there, *this* is a **test** email written in `markdown`
pandoc 命令
pandoc email.md -t html -o email.html
email.html
<p>Hi there, <em>this</em> is a <strong>test</strong> email written in <code>markdown</code></p>
但是,格式并不总是我想要的。例如,在 Markdown-here 中,它曾经类似于 StackOverflow 的 blockquotes 渲染
块引用看起来像这样
但是,在我的 pandoc->Thunderbird 工作流程中,HTML 元素是这样的:
<blockquote>
<p>Blockquotes looks like this</p>
</blockquote>
呈现为缩进文本,例如:
块引用看起来像这样
这让我的电子邮件不太容易被跟踪。
我读过 pandoc 有一个 --css 标志,您可以在其中定义要使用的 CSS 表,例如s --css=styling.css。但是,我尝试过的任何方法似乎都不起作用。
有谁知道如何在 pandoc 中嵌入对生成的 HTML 的块引用样式的更改,以更紧密地遵循 StackOverflow 和 GitHub 的渲染降价样式?
【问题讨论】:
-
如果您觉得这个答案有用,请考虑接受它
-
谢谢,很有帮助。在接下来的几周里,一位 Thunderbird 开发人员恢复了 Markdown-here 扩展以涵盖我的用例 gitlab.com/jfx2006/markdown-here-revival>
标签: html css markdown pandoc thunderbird