Skip to:

Opened 10 years ago

Last modified 10 years ago

#2693 new defect (bug)

Forum: Code tags strip leading/trailing blank lines

Reported by: cefiar's profile cefiar Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.5
Component: Component - Forums Keywords: needs-patch needs-unit-tests


Any leading/trailing blank lines wrapped in a code block on the forum (using the ` character) get stripped from the code block.

This is sometimes useful when pointing out either flaws or issues with things that may be caused by these leading blank lines.

In the case I discovered it, I was quoting back a section of raw HTML from a website that was adding blank lines to the start of the returned page, before the !DOCTYPE tag.

Note: As the code block is wrapped with both pre and code tags (in HTML), extra blank lines are actually displayed if they are preserved, as editing with a browser dev tool (eg: Firebug/Web Developer/etc) will show.

Change History (1)

#1 @netweb
10 years ago

  • Keywords needs-patch needs-unit-tests added
  • Milestone changed from Awaiting Review to 2.7
  • Version set to 2.5

Thanks for the ticket, going to have to take a close look at both some code examples and what not.

Putting this in the 2.7 milestone as we can save ourselves lots of testing by including some unit tests for this.

Note: See TracTickets for help on using tickets.