-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.2.5, 7.0.10
-
6.02
-
4
-
Severity 3 - Minor
-
1
-
I recently tried to insert various regular expressions as samples inside an issue description, and noticed that the {{ curly brace markup }} (used for inline monospaced text; as opposed to block monospaced text using the {code} and {noformat} markup) behaves a bit strange when using curly braces inside the text (such as a regex).
This might be related to JRA-38048, but that one was closed since it seemingly related to just the inconsistent preview. However, the problem also shows in the actual issue description (and possibly other fields/comments).
Maybe a quick sample:
Use the regex {{\[A-Z0-9\]\{4,20\}}} for your validator.
Expected would be that the string "[A-Z0-9]{4,20}" is shown as monospaced text. What actually happens is that "[A-Z0-9]{4,20" is monospaced, followed by a single } - and this looks a bit odd considering that the first of the 3 braces was escaped, while the latter 2 were not.
As a user, I assumed that escaping also breaks the use for the markup parser, leaving } as verbatim brace while the rest }} is used as end-marker for the inline monospace.
Trying out other ways of escaping does not seem to work correctly (such as adding backslashes, spaces or other characters that might be hidden in output):
- [A-Z0-9]{4,20} (monospaced, but ends early)
- {{[A-Z0-9]{4,20}\ }} (not monospaced, extra backslash and space)
- {{[A-Z0-9]{4,20}
}} (not monospaced, extra newline) - {{ [A-Z0-9]{4,20} }} (not monospaced, extra space)
- [A-Z0-9]{4,20} (monospaced, but ends early; this is actually matching the output as I'd be expecting the last brace to be used as-is)
- {{\[A-Z0-9\]\{4,20\}}} (monospaced, but ends early) - {{\[A-Z0-9\]\{4,20\}\ }} (not monospaced, extra backslash and space) - {{\[A-Z0-9\]\{4,20\}\\}} (not monospaced, extra newline) - {{ \[A-Z0-9\]\{4,20\} }} (not monospaced, extra space) - {{\[A-Z0-9\]\{4,20}}\} (monospaced, but ends early; this is actually matching the output as I'd be expecting the last brace to be used as-is)
- is duplicated by
-
JRASERVER-38313 Can't escape "}" character
- Closed
- is related to
-
JRASERVER-45342 Can't escape brackets inside {code} blocks
- Gathering Impact
- relates to
-
JRASERVER-39690 Curly braces in monospaced comment displayed out of monospace box
- Gathering Impact