musiqpad / mqp-server

NodeJS server base for hosting an individual pad
MIT License
30 stars 18 forks source link

Adding back italic text (_Text_) #11

Closed explodingcamera closed 8 years ago

explodingcamera commented 8 years ago

Also changed bold to **Text** and italic to *Text* because thats how github does it (I just think that'd be more familiar for users).

ImExiled commented 8 years ago

I hate to be that guy, but I seriously hate the idea of this. I hate using * or \ for bold or italic. I just hate it. Like if its going to be added at least have it be a toggle.

explodingcamera commented 8 years ago

* already is bold, this just adds italic. What are the alternatives?

goto-bus-stop commented 8 years ago

Slack has *bold*, and _italic_, which is a bit more fun, I think.

foodbandlt commented 8 years ago

@goto-bus-stop We had _italic_ in the past, but it interferes with usernames since _ is a legal character. Same goes for -.

The easiest way would be to use characters that aren't able to be used in usernames (everything not alpha-numeric, -, _).

Slightly harder way, adjust the parser to not parse mentions for formatting tags. That might be the way to go, honestly.

explodingcamera commented 8 years ago

okay, it's now using _ and not parsing mentions anymore

foodbandlt commented 8 years ago

@henr-y Sorry to get back to you so late on this. I don't know how much I care about misuse of the tags, but This_ is a @User_with_underscores makes the text between the first and second underscore italic despite the second being part of the username. I don't care all that much, though I'd like to preserve the username if possible.

TL;DR : This works if the beginning underscore is in the username, but breaks when the ending underscore is in the username.

explodingcamera commented 8 years ago

@foodbandlt The other tags can be misused too atm ^^ edit: I'll try to change the regex a bit

foodbandlt commented 8 years ago

Ahah, nice. I didn't check that. Should be a way to do it with regex. If you can't get it I'll put some thought into it, heh.

Thanks! Sorry for being so stringent...