WYSIWYG buttons on multiline text bug


#1

Hi, I think there’s a bug with the WYSIWYG buttons when applying bold and italics to highlighted text if it has new lines.

The highlighted section of text will get an asterisk (or two for bold) at the beginning and end, but it won’t appear in italics or bold in the preview window. This is probably an intended feature/limitation of Markdown, but I think the effect that the bold/italics WYSIWYG buttons have should be considered a bug.

The fix should probably be that the buttons should apply asterisks to the beginning and end of each line the user has highlighted.

I searched for existing topics before posting and think I found a closed bug that applies to the same issue here. Robin fixed the issue but reverted it at Sam & Jeff’s suggestion. The fix allowed the bold to apply over multiple lines, I think the fix suggested above should be a valid alternative.


Example showing the affect on multiline text at the moment:

*first line
second line
third line*

What I think the buttons should do:

*first line*
*second line*
*third line*

#2

If one of the people involved in the original fix (@sam, @eviltrout) could confirm the problem exists for them and the fix I suggested sounds fine I think I could implement it and submit a pull request.


(Jeff Atwood) #3

Well, eventually we wanted to rewrite the editor to depend on jQuery and Ember and simplify the code a lot, but there’s never time, and it’s a low priority, etc.


#4

OK, that’s cool. Makes sense that it’s low priority since it works well for now, but would you agree that this specific functionality is broken?


(Jeff Atwood) #5

Sure, if you want to do a PR that is fine. But I would not support a lot of lines of new code for this minor case.


#6

This is fixed with PR3288.


(Jeff Atwood) #7