有没有办法在Github Flavored Markdown中获得彩色文字? [英] Is there a way to get colored text in Github Flavored Markdown?

查看:174
本文介绍了有没有办法在Github Flavored Markdown中获得彩色文字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在github上记录一个在终端输出彩色文本的图书馆。

I need to document a library on github that output colored text in the terminal.

我尝试过跨越< style = color:red> < font color =red> 但似乎删除了两个标签。

I've tried both span <style="color:red"> and <font color="red"> but it seems to strip out both tags.

唯一的方法是使用彩色文本的图像?

Is the only way to do this is with images of colored text?

编辑:

我最终添加了git和使用图像链接w / github相对URL的屏幕截图。

I ended up adding screenshots to git and using image links w/ github relative urls.

推荐答案

您不能在 GFM 中包含样式指令。

You cannot include style directives in GFM.

最完整的文档/示例是 Markdown Cheatsheet ,它说明这个元素< style> 缺少。

The most complete documentation/example is "Markdown Cheatsheet", and it illustrates that this element <style> is missing.

如果您设法将文本包含在GFM元素,那么您可以使用 github.css样式表播放,以便以这种方式进行颜色。

If you manage to include your text in one of the GFM elements, then you can play with a github.css stylesheet in order to colors that way.

这篇关于有没有办法在Github Flavored Markdown中获得彩色文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆