How can I style individual table cells for Markdown to HTML conversion using Pandoc? - Stack Overflow

In Markdown I have tables like in the following example:| | Fruit | Vegetable ||---------

In Markdown I have tables like in the following example:

|             | Fruit | Vegetable |
|-------------|-------|-----------|
| Apple       | yes   | no        |
| Broccoli    | no    | yes       |
| Carrot      | no    | yes       |
| Orange      | yes   | no        |
| Tomato      | (yes) | yes       |

Now I would like to highlight the "Tomato-Fruit" cell with some background color when converting the Markdown file to HTML using Pandoc.

I tried adding some cell attribute like this:

| Tomato      | {: .emph} (yes) | yes |

and used the following command for conversion

pandoc -f markdown+markdown_attribute -t html -o output.html input.md

but the HTML output contains the {: .emph} string literally, instead of being transformed into an HTML element class attribute (tested with Pandoc version 3.1.3).

Is there a way to style individual cells in Markdown as parsed by Pandoc?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745622670a4636616.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信