问题描述
我需要在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,并使用带有GitHub相对URL的图像链接.
I ended up adding screenshots to Git and using image links with GitHub relative URLs.
推荐答案
您不能在 GFM .
最完整的文档/示例是" Markdown备忘单",它说明此元素< style>
丢失了.
The most complete documentation/example is "Markdown Cheatsheet", and it illustrates that this element <style>
is missing.
如果您设法将文本包含在GFM元素之一中,则可以使用 github.css样式表,以便以这种方式进行着色,这意味着使用内联CSS样式指令为颜色进行着色,指的是上述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, meaning to color using inline CSS style directives, referring to said css stylesheet.
这篇关于有没有办法在GitHub降价的Markdown中获取彩色文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!