github / markup

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

No longer possible to color text in Markdown #369

Closed peterflynn closed 10 years ago

peterflynn commented 10 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})$.

ghost commented 5 years ago

Can GitLab actually give a reason why this request is being ignored? Is it because it is too technically challenging to implement or because they don’t think this feature has merit? I would of thought it would be relatively easy to allow users to use foreground and background colours in Markdown - the syntax already exists in HTML, which could be implemented by allowing the SPAN tag in Markdown. Happy to stop pushing for this if there is actually a technical reason why this isn’t possible.

loren-osborn commented 5 years ago

@bkeepers, which gem are you using for this. Can you provide a link to the repository so one of us can propose an upstream PR?

Thank you.

Prendeon commented 4 years ago

I've come across this thread since i needed to highlight some parts of a README file in green and red. I have resorted to using the diff language tag to generate some colored text and it luckily fits my use case, but i want to express my interest in re-opening this unfortunately closed issue and hope we can get an update on the current situation as to why this is not possible after 5 years since this feature has been requested.

xformerfhs commented 4 years ago

And another one! Please make it possible to highlight text in different colors. I would need for my documentation. So, if you need some info why this would be good.

One of my projects puts out strings like this "4$VYb030llJwQLSmOT+OwsjA$1R447MnqP71JV12qXASEd++gR3cW9AfRUHVmWThiRwU+JzGHD99p53wbIV+kKoiy$cVBESqRgkflwX2jzBkThyfAzHWJm3L1tg5LCq849Pzw". This string is made of 4 different parts. Being able to color each of these parts would help the reader very much.

JackOfSpade commented 4 years ago

I don't understand, is this too complex too implement or cost too much money?

I WILL THROW MONEY AT YOU TO MAKE THIS HAPPEN!

fenilgandhi commented 4 years ago

:disappointed: 6 years down the line. Still no support. Github supports all the stupid emojis but not colored text. :weary:

perlygatekeeper commented 4 years ago

I do not believe we have waited this long with no definitive yes or no!

GiuseppeChillemi commented 4 years ago

We need colors, coding is no more a monocrome text on a terminal, Microsoft, give us life !

solrachix commented 4 years ago

my god it takes

jeppeutzon commented 4 years ago

Colors please!

Agarwal-Tanvi commented 4 years ago

Colous please! @github-cla

Xaekai commented 4 years ago

if you must, try this:

```diff - red + green ! orange # gray ```

to render something visually appealing such as:

#

-! Warning !-

or

+( Venisons dear isn't it? )+

or

!~ Dwarf Shortage ~!

or

#=- Stationary Store Moves -=#

reposting so its immediately visible

ChristianMertes commented 4 years ago

if you must, try this:

- red
+ green
! orange
# gray

to render something visually appealing such as:

-! Warning !-

or

+( Venisons dear isn't it? )+

or

!~ Dwarf Shortage ~!

or

#=- Stationary Store Moves -=#

reposting so its immediately visible

Thanks! But... seriously, Github? An HTML 1.0 feature like this? What is this, gopher?

wyz23x2 commented 4 years ago

+1!!

! Don't want to add the "!"!
+ Why "+"?
- Don't want "-" either.
# Why??
@@ Not change diff, but add a new language for it. @@
@@ Or greater is SUPPORT HTML style!! @@
alec42 commented 4 years ago

+1 Please add colours

volkantash commented 3 years ago

As a workaround, you guys can use something like this ⬇️ ![#FF0000](https://placehold.it/15/FF0000/000000?text=+)

It will display this: #FF0000 #FF0000

My work. Thanks. 💯

■ ■ ■ ■ ■ ■ ■ ■■■■■ ■ ■■■■■

baryluk commented 3 years ago

I would love color support in text too, I have a command line utility that utilizes ANSI color for terminal output, and it is a main feature of it, as it without it is less usable. And to showcase it in README.md properly, I need to put a screenshot, which is silly a bit.

screenshot

Having it be a text, would make it easier to update it automatically on code changes, make it more accessible, response to background color changes better, and probably make it be a little more SEO / search friendly, and make it more friendly on mobile.

paquinmathieu commented 3 years ago

hi, so Github, what's up with text color? At least integrate the <span style="color:red"> RED TEXT </span> to work... using the diff option works, but... its not fun to use.

Please

GiuseppeChillemi commented 3 years ago

Colors are the best thing in life, we don't want a B&W one. Computers had their sad monochrome days, then came the happiness with colors, why going back?

deelawson11 commented 3 years ago

I am so tired of this shit. My hacker uses your website along with his 10 aliases. Can't you get him to stop hacking me. This has been going on for almost 10 yrs. It's actually stalking EU commission wants me to get the local police involved. I don't want to but I guess that's where it is going. His name is Derek Pate but I don't think he uses that name. Just so he stays out of trouble.

Get Outlook for Androidhttps://aka.ms/ghei36


From: GiuseppeChillemi notifications@github.com Sent: Friday, January 29, 2021 5:59:25 AM To: github/markup markup@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [github/markup] No longer possible to color text in Markdown (#369)

Colors are the best thing in life, we don't want a B&W one. Computers had their sad monochrome days, then came the happiness with colors, why going back?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/github/markup/issues/369#issuecomment-769763071, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD7APK2W5JWIWL4SHR4K23S4KPJ3ANCNFSM4AUNGX5A.

paquinmathieu commented 3 years ago

I am so tired of this shit. My hacker uses your website along with his 10 aliases. Can't you get him to stop hacking me. This has been going on for almost 10 yrs. It's actually stalking EU commission wants me to get the local police involved. I don't want to but I guess that's where it is going. His name is Derek Pate but I don't think he uses that name. Just so he stays out of trouble.

wow, you are completely confused. This ain't the support channel. This is about colored github issues. Completely unrelated

eberamp commented 3 years ago

Welcome 2021, still no colors...

EasyG0ing1 commented 3 years ago

This is a closed request. Literally, every comment in here for a long time now has fallen upon deaf ears.

I think a new request needs to be opened. Not sure why this one was closed.

ddopson commented 3 years ago

Instead of posting +1 here, please add your support to issue #1440.

teshanshanuka commented 2 years ago

2022 and still waiting... *sigh*

Adventuresofbot commented 2 years ago

We need colour text plz

volkantash commented 2 years ago

put in text editor: 8-10 color. No need custom color.

paquinmathieu commented 2 years ago

this issue is closed. I don't think github staff will be looking at your comments here. I suggest you comment here https://github.com/github/markup/issues/1440

Adityaadpandey commented 2 years ago

Yes you are right!!!

magicse commented 1 year ago

2023 and still waiting #### $\textcolor{red}{\textsf{Color didint work .}}$

$\textcolor{red}{\textsf{Color didint work .}}$

paquinmathieu commented 1 year ago

dont comment here. Its useless.

this issue is closed. I don't think github staff will be looking at your comments here. I suggest you comment here https://github.com/github/markup/issues/1440

patheticcockroach commented 1 year ago

dont comment here. Its useless.

this issue is closed. I don't think github staff will be looking at your comments here. I suggest you comment here #1440

Frankly, I don't think commenting in the new issue is of much use either. They just couldn't care less, to stay polite.

kratofl commented 1 year ago

2023 and still waiting #### $\textcolor{red}{\textsf{Color didint work .}}$

Well, it does work now xD

JianqiangDing commented 1 year ago

2023 and still waiting #### $\textcolor{red}{\textsf{Color didint work .}}$

Well, it does work now xD

finally!!!

Hapaxia commented 11 months ago

2023 and still waiting #### $\textcolor{red}{\textsf{Color didint work .}}$

$\textsf{{\color[rgb]{0.0, 0.0, 1.0}I}{\color[rgb]{0.1, 0.0, 0.9}t~ }{\color[rgb]{0.2, 0.0, 0.8}d}{\color[rgb]{0.3, 0.0, 0.7}o}{\color[rgb]{0.4, 0.0, 0.6}e}{\color[rgb]{0.5, 0.0, 0.5}s~ }{\color[rgb]{0.6, 0.0, 0.4}n}{\color[rgb]{0.7, 0.0, 0.3}o}{\color[rgb]{0.8, 0.0, 0.2}w}{\color[rgb]{0.9, 0.0, 0.1}!}{\color[rgb]{1.0, 0.0, 0.0}!}}$

Note, however, that it's still unselectable or searchable as text.

kunalspathak commented 10 months ago

Looks like, this turns off the syntax highlighting in <details>

$\textcolor{red}{\textsf{Colored summary}}$ ```diff - old line + new line ```