github / markup

Determines which markup library to use to render a content file (e.g. README) on GitHub
MIT License
5.83k stars 3.4k forks source link

No longer possible to color text in Markdown #369

Closed peterflynn closed 9 years ago

peterflynn commented 9 years ago

Earlier, GFM allowed you to create colored text this way: <font color="red">Status: **Not yet implemented**</font>

That used to work. But at some point the <font> tag was removed from the HTML sanitization whitelist.

I suppose it got removed because it's deprecated in HTML5. (Aside: the color attribute is still on the whitelist. Should it be removed too? As far as I know, there's no other HTML tag it can be used on...)

So, can we have a new supported way of coloring text in sanitized GFM now?

Here's one possibility: allow a very strict use of style for setting colors. Only attributes that exactly match the form style="color: #xxxxxx" would be permitted. For something as constrained as that, you could enforce it with a simple regexp like ^color:\s*#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$.

bkeepers commented 9 years ago

Thanks for the request. This gem only handles markup to HTML conversion, but I've logged your feature request for our design team to consider.

nogweii commented 9 years ago

Any news on this? Has there been a decision? Hopefully, this will be supported. :smiley:

perlygatekeeper commented 9 years ago

I second that opinion. Actually and way to color text would be great.

bertenator commented 9 years ago

Third!

chuckh commented 9 years ago

Fourth.

JpotatO commented 9 years ago

Me too I support this feature, it can be great to at last color the text, but using style="" to set the colors is better for me, I normaly use with <em></em>,<strong></strong>, <u></u>, <s></s>… well mainly text format', or in <blockquotes> too, but it don't work on github…

Adding a way to add a background color can be great too, when I make <table></table> it can be hard to easily see the entries and separators <th></th>.

amnotafraid commented 7 years ago

Yes, please!

I like to write color-coded documentation. When I document a complicated set of instructions, I like to put a list of the parameters that are needed at the beginning and then give each parameter it's own color.

paulnakroshis commented 7 years ago

Plus, for commenting student jupyter notebooks, it would be awesome to write my comments in color.

bala-sridaran commented 7 years ago

I agree that we have to have the color tags back.

paulnakroshis commented 7 years ago

For the time being, I can use text goes here Which allows html to render the text…but some markup simplicity would go a long way here…

Another item that would be nice would be to be able to color the background color of a Jupyter notebook cell…

-p


P a u l A. N a k r o s h i s

Associate Professor of Physics pauln@maine.edu Chair, Department of Physics University of Southern Maine Office : 207. 780. 4158 96 Falmouth Street FAX : 207. 228. 8288 Portland, ME 04104-9300

Web Presence:

University site: http://people.usm.maine.edu/pauln/ Science Blog: www.paulnakroshis.net Photography Blog: www.mainesight.com and Portfolio: www.paulandrewphoto.com twitter: @paulnakroshis google+: https://plus.google.com/+PaulNakroshis


On February 15, 2017 at 11:00:50 AM, bala-sridaran (notifications@github.com) wrote:

I agree that we have to have the color tags back.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/github/markup/issues/369#issuecomment-280051726, or mute the thread https://github.com/notifications/unsubscribe-auth/ADOfRv7s8yLbC2leKMAQ1a_Em8vtkxoIks5rcyEygaJpZM4CjTX6 .

JarrettBillingsley commented 7 years ago

@paulnakroshis really? I can't use that at all.. the style attribute is disallowed.

SnchitGrover commented 7 years ago

+1

sunlee-newyork commented 7 years ago

+1

ludzzz commented 7 years ago

No news about this request ? GFM won't get colorized text anymore?

cklie commented 6 years ago

+1

Narvey commented 6 years ago

@cklie etc: You guys are commenting on a closed issue, which won't do any good. This is also the wrong repo.

The relevant issue to support would be html-pipeline#287, as that is the repo that actually does the HTML filtering.

EDIT: this is incorrect, see below.

Khalilsqu commented 6 years ago

please color

E3V3A commented 6 years ago

@Narvey

You guys are commenting on a closed issue, which won't do any good. This is also the wrong repo.

  1. Why did you close it, if it is not resolved?
  2. The issue you linked, refer back to you guys as using a "different whitelist".
  3. THIS is the github repo, so why do you say it's wrong??
Narvey commented 6 years ago

@E3V3A I was wrong about the other repo, I read that this filtering was done elsewhere, but either that was wrong to begin with, or has changed since 2015.

I have no idea why it was closed. @bkeepers, is there a Trello board or something else that this is being tracked on, or should we reopen it here?

tecz commented 6 years ago

Four years later--is there still no way to color text in a GitHub readme or some sort of whitelist of what's allowed so I can at least try to hack together a solution?

Filtering out certain HTML/CSS attributes is completely understandable, but I have a few projects with use-cases involving the ability to change the font size and font color in a few readme files. Is this ever going to be possible, or do I need to look into utilizing another tool to accomplish this?

README.md files on GitHub can be so incredibly convenient to use, but it always feels like there's something I need that the web interface makes weirdly impossible to do (e.g. color text, print a README file without all of the chrome)...

didix21 commented 6 years ago

I do not understand why text color is not possible on github when so many people is demanding it...

patheticcockroach commented 6 years ago

I remember 20 years ago in basic HTML we could already have colors on the Internet. This is so modern. 🙄

tecz commented 6 years ago

GitHub is such an awesome service, but it's easy working somewhere like GitHub to forget that a lot of the rest of us are stuck working with managers who will specifically ask "this documentation is great, but can you make that text red?" or "how do I print this readme without all of the other crap on it?"

JarrettBillingsley commented 6 years ago

I eventually gave up and decided to use GH pages + jekyll. It's great, and multimarkdown is even better than GFM.

akskuchi commented 6 years ago

this would totally be a killer feature! would be great if it is prioritized

bogdanpolak commented 6 years ago

+1 for: <span style=“color:red;”> text </span>

Scure21 commented 6 years ago

+1 yes, please!

arcusfelis commented 6 years ago

Please, don't add "+1" comments to the issue. And to any issue on github in general. Just add thumbs up to the first comment.

Because otherwise a big group of people would be notified over email with your comment.

mhyousefi commented 6 years ago

Really? It is 2018 and we can't color our texts in GitHub Readmes???

thiemve commented 6 years ago

I am so glad people continue to wish for this development Hope it will actually come true one day

Endor8 commented 6 years ago

Yes this is something I really miss. Please at the possibility to modify the text color. Thanks

E3V3A commented 6 years ago

Apparently nobody GaF here... Even suggesting to reopen a closed issue that was wrongly closed without any reason. (Let's do it the old fashioned MS way, put our head up our * and pretend the problem doesn't exists.)

JawsomeJason commented 6 years ago

@E3V3A Maybe we just need to try it on Windows 10 🤣

PeterKneale commented 5 years ago

This might help:

Status: **Not yet implemented**

![Status: **Not yet implemented**](http://placehold.it/350x65/FF0000/FFFF00.png&text=Not+yet+implemented) 

https://stackoverflow.com/questions/11509830/how-to-add-color-to-githubs-readme-md-file

montanaflynn commented 5 years ago

I also would like to have github flavored markdown allow css styling, including background color if possible:

https://github.com/montanaflynn/github-colors/tree/new-go

Should look like this:

screen shot 2019-02-09 at 23 08 42
arthurxavier commented 5 years ago

+1

sonaaliM commented 5 years ago

Still waiting for this to be resolved

EPiC-APOC commented 5 years ago

+1

praweb commented 5 years ago

+1

jorgedfbranco commented 5 years ago

+1

matheusft commented 5 years ago

+1

AzySir commented 5 years ago

Please re-open this and provide an update. It's a handy functionality and many people have expressed interest!

a2sheppy commented 5 years ago

I'll pile on to say that I have significant need for this capability for my work.

dyasny commented 5 years ago

+1

AzySir commented 5 years ago

@dyasny good luck - Sounds like no one wants to touch this. Maybe Microsoft employed someone who would be willing to take on the challenge ;)

ghost commented 5 years ago

This is ridiculous - how hard can it be to add the ability to allow <span style="color: red;">text</span> into the markdown - what is the point of allowing issues to be raised if no one actually gives two hoots about them, when there is obviously a lot of people who would benefit from this feature?

davidalexandercurrie commented 4 years ago

+1

algirdask commented 4 years ago

+1

fearphage commented 4 years ago

Please do not add +1 to this or any issue. It notifies everyone and provides no value.

If you want to show your support for an issue, add a reaction to the original comment.

If you want to be notified about changes/updates, there's a subscribe button near the top on the right.

jeffreydwalter commented 4 years ago

I'll +1 this to be annoying like the lazy Github developers that have kicked this can down the road for 5+ years... Why can't you guys add some basic support for coloring text?!? It's way past ridiculous already.