#5490 - comcode_to_text: Comcode not stripping newlines from inside tags when test indicates we expect it to

  • By
  • Added
  • 0 views
Identifier #5490
Issue type Trivial issue (does not break functionality)
Title comcode_to_text: Comcode not stripping newlines from inside tags when test indicates we expect it to
Status Open
Handling member Chris Graham
Addon core
Description The comcode_to_text unit test uses newlines inside Comcode tags, e.g.

[box="box title"]
box contents
[/box]

...which results in a newline from strip_comcode since a newline exists after "box contents" and before the ending box tag.

Moving the end box tag to the same line as box contents results in the newline no longer being present.

My question is if strip_comcode is supposed to remove trailing newlines when they exist within Comcode tags, or not.
Steps to reproduce

Additional information @@ -17,4 +17,5 @@

box contents
+

**test bold**
@@ -23,4 +24,6 @@

***test highlight***
+
+

blah
@@ -33,4 +36,6 @@

bar
+
+

(unnamed)
Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated