Trim trailing whitespace breaks explicit Markdown newlines in playground markup comments

Originator:armadsen
Number:rdar://41104623 Date Originated:13-Jun-2018 04:36 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Version 9.4 (9F1027a)
Classification:UI/Usability Reproducible:Always
 
Summary:
Markdown supports forcing a newline between lines in a paragraph by ending a line with two spaces. That way:

/*:
Line 1  
Line 2  
Line 3
*/

gets rendered as:

Line 1
Line 2
Line 3

instead of:

Line 1Line 2Line 3

If the “Automatically trim trailing whitespace” option in Xcode’s Text Editing preferences is enabled, Xcode will strip trailing whitespace on a line and break this feature of Markdown.

It seems sane to add an exception so that even if the “Automatically trim trailing whitespace” option is on, spaces at the end of lines in a playground markup comment are left as-is. (Not sure if it makes sense for regular comments in arbitrary source code files.)


Steps to Reproduce:
 

Expected Results:
 

Actual Results:
 

Version:
Version 9.4 (9F1027a)

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!