Defect #30099

Multiple blank lines in pre tags are not preserved in Textile

Added by Go MAEDA 8 months ago. Updated 4 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Text formatting
Target version:Candidate for next major release
Resolution: Affected version:

Description

Line breaks should be rendered intact in pre blocks but consecutive line breaks are not rendered in Textile. It works as expected in Markdown.
Input:

Expected:

Actual:

screenshot-input@2x.png (8.46 KB) Go MAEDA, 2018-12-05 03:53

screenshot-expected@2x.png (10.1 KB) Go MAEDA, 2018-12-05 03:53

screenshot-actual@2x.png (9.77 KB) Go MAEDA, 2018-12-05 03:53

30099.patch Magnifier (1.42 KB) Takenori TAKAKI, 2019-02-18 05:37

30099-fixed-30987.patch Magnifier (1.23 KB) Takenori TAKAKI, 2019-03-19 09:53


Related issues

Related to Redmine - Defect #30987: Unnecessary empty lines are displayed when syntax highlig... Closed

Associated revisions

Revision 17891
Added by Go MAEDA 5 months ago

Multiple blank lines in pre tags are not preserved in Textile (#30099).

Patch by Takenori TAKAKI.

Revision 17939
Added by Go MAEDA 4 months ago

Reverts r17891 (#30099).

History

#1 Updated by Takenori TAKAKI 5 months ago

I think that it is possible to solve the problem by swapping the order of 'escape pre content' and 'clean up white space' in RedCloth#to_html.
I made a patch and attach it.

#2 Updated by Go MAEDA 5 months ago

  • Target version set to 4.1.0

Setting the target version to 4.1.0.

#3 Updated by Go MAEDA 5 months ago

  • Subject changed from Consecutive line breaks in a pre element are not rendered in Textile to Multiple blank lines in pre tags are not preserved in Textile
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for fixing this issue.

#4 Updated by Go MAEDA 4 months ago

  • Related to Defect #30987: Unnecessary empty lines are displayed when syntax highlighting added

#5 Updated by Go MAEDA 4 months ago

  • Status changed from Closed to Reopened

This patch causes a problem reported as #30987.

I think r17891 should be reverted.

#6 Updated by Go MAEDA 4 months ago

  • Status changed from Reopened to New
  • Target version deleted (4.1.0)
  • Resolution deleted (Fixed)

#7 Updated by Takenori TAKAKI 4 months ago

Go MAEDA wrote:

This patch causes a problem reported as #30987.

I think r17891 should be reverted.

Sorry for the problem reported in # 30987.
I made another patch to fix this problem.
I hope it will be improvement for Redmine.

#8 Updated by Go MAEDA 4 months ago

  • Target version set to Candidate for next major release

Also available in: Atom PDF