Edgewall Software
Modify

Opened 2 years ago

Last modified 2 years ago

#13187 new defect

Text after diff block is not rendered

Reported by: Jun Omae Owned by:
Priority: normal Milestone: topic-wikiengine
Component: wiki system Version: 1.0-stable
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I enter the following text in ticket comment, but diff block only is rendered. "This text disappears" is not rendered. Removing {{{ after ==== Python Traceback ==== line, the issue goes away.

{{{#!diff
diff --git a/trac/web/main.py b/trac/web/main.py
index c75199f79..4479ac5a0 100644
--- a/trac/web/main.py
+++ b/trac/web/main.py
@@ -761,12 +760,13 @@ def send_internal_error(env, req, exc_info):
             %(interface_customization)s
             ==== Python Traceback ====
             {{{
-            %(traceback)s}}}"""),
-            method=req.method, path_info=req.path_info,
-            req_args=pformat(req.args), sys_info=sys_info,
-            enabled_plugins=enabled_plugins,
-            interface_customization=interface_files,
-            traceback=to_unicode(traceback))
+            %(traceback)s}}}""")
+        return gettext(msgid,
+                       method=req.method, path_info=req.path_info,
+                       req_args=pformat(req.args), sys_info=sys_info,
+                       enabled_plugins=enabled_plugins,
+                       interface_customization=interface_files,
+                       traceback=to_unicode(traceback))

     # Generate the description once in English, once in the current locale
     description_en = get_description(lambda s, **kw: safefmt(s, kw))
}}}
This text disappears....
}}}

Attachments (0)

Change History (2)

comment:1 by Ryan J Ollos, 2 years ago

Milestone: next-stable-1.0.x1.0.20

comment:2 by Jun Omae, 2 years ago

Milestone: 1.0.20topic-wikiengine

I noticed the behavior is by design because code blocks {{{ and }}} can be nested. However, it confuses me with no warnings even though }}} is missing.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.