Remove the trailing blank line in markdown text.
Review Request #4533 — Created Sept. 6, 2013 and submitted
Remove the trailing blank line in markdown text.
The markup() function returns a string with an extra blank line (as
every HTML tag is outputted with a trailing newline). We don't really
want this, since it leaves a blank line in each <pre>, so check if
there's a newline and strip it away. This brings the look to how we had
things pre-markdown.
Tested locally with different text. The textboxes no longer had the
annoying final newline.Unit tests pass.
Description | From | Last Updated |
---|---|---|
Could we use .trim() instead? |
david |
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
Ignored Files:
reviewboard/static/rb/js/utils/textUtils.js
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
Ignored Files:
reviewboard/static/rb/js/utils/textUtils.js