Quoting with same formatting


(Julien Gourdon) #1

As I understand, we currently can only quote by selecting text and things already rendered in the messages thread. Some other forums enable quoting exactly what was typed by the user (I mean, the markdown language)
That means for example you can quote coloured text and it would appear coloured in your quote (because the markdown is quoted too.)

This does not seem to be supported by the current way discourse enables quoting. Am I wrong?

Example:

Text to be quoted:

When quoted:

Note that the emphasis on “They are all solutions to build A Website.” has disappear.

I would also like links to be quoted as links, oneboxes as oneboxes, images as images, and so on.
Is it a bug or feature request?


Quoted lists lose bullets/numbers
(Tim Stone) #2

I’m not sure, but it’s certainly annoying. I’ve been meaning to poke around with some of the quoting stuff this week, but I’ve unfortunately been extremely busy. I do already have some JavaScript that will reverse-transform inline Markdown from HTML that I use for something else though, so if I can get the relevant HTML based on the selected text I should be able to patch that in and take care of the worst offenders.


(Jeff Atwood) #3

That would be great… Definitely an annoyance.


(Tim Stone) #4

Aiming to take care of those iPad-related annoyances too, although debugging JavaScript issues on iOS is near impossible now without a Mac to attach it to. But I decided I was overdue for a new laptop anyway. :wink:


(Sam Saffron) #5

One trick I use is weinre http://people.apache.org/~pmuellr/weinre-docs/latest/ the build in iOS 6 stuff is a touch better, but it is handy


#6

It looks like this fell off everyone’s radar. Now that we’re post v1, can we revisit?


(Sam Saffron) #7

It’s massively complex, we need an algorithm that can fish valid markdown out of 2 markers in cooked html

So much edge case

It’s possible we can just reverse trivial stuff like bold/italics I dunno


Quoted lists lose bullets/numbers
(Zane Beckman) #8

Could the markdown parser be altered to indicate and encode the original markdown syntax in the final output in a way that’s effectively invisible to users but solves a lot of the hairiness of this problem? This seems most applicable to the complicated stuff like quotes, oneboxes, etc.

Just reversing bold / italics / pre might be easiest for the simple stuff, like you say.


#9

Yes, I agree it isn’t simple. But it would be great. There are some other issues, like code sections breaking quotes. Fixes like that would be needed to fully get this working, but would also be good in their own right.


(probus) #10

Quoting is one of the most basic fuctions in a forum, I hope you can make it work much better in the future.


(Régis Hanol) #11

Better late than never.

We can now leverage @vinothkannans’ html to markdown library to keep formatting when quoting :tada:


(Régis Hanol) #12