Edgewall Software
Modify

Ticket #7037 (closed defect: worksforme)

Opened 4 years ago

Last modified 4 years ago

Ticket : formatting oddities

Reported by: jouvin@… Owned by: cboos
Priority: normal Milestone:
Component: ticket system Version:
Severity: normal Keywords:
Cc:
Release Notes:
API Changes:

Description

Hi,

When entering the text below in a ticket description without enclosing between {{{}}}, line feed are not preserved after Local Variables. trac.ini contains preserve_newlines = default in [ticket] section.

The same already happened in 0.10.4.

Michel

    * File "/tmp_mnt/www/Web/servers/trac/0.11-b2/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/web/main.py", line 419, in _dispatch_request
      Code fragment:
       414. try:
       415. if not env and env_error:
       416. raise HTTPInternalError(env_error)
       417. try:
       418. dispatcher = RequestDispatcher(env)
       419. dispatcher.dispatch(req)
       420. except RequestDone:
       421. pass
       422. resp = req._response or []
       423.  
       424. except HTTPException, e:
      Local variables:
      Name	Value
      after 	[' except RequestDone:', ' pass', ' resp = ...
      before 	[' try:', ' if not env and env_error:', ' raise ...
      dispatcher 	<trac.web.main.RequestDispatcher object at 0x14174bc10>

Attachments

Change History

comment:1 Changed 4 years ago by anonymous

  • Milestone 0.11 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

If you want to preserve the line breaks, use explicitly preserve_newlines = yes.

default was introduced in order to keep backward compatibility when upgrading 0.10.x environments, which, as you noted, don't preserve the line endings. So for new environments, default means yes and for upgraded environment, this means false.

You can of course explicitly choose either behavior by specifying either yes or no, regardless of the environment being a new or an upgraded one. Please reopen if this doesn't work as advertised (e.g. it doesn't preserve newlines with default for a newly created environment).

comment:2 Changed 4 years ago by cboos

(anonymous was me)

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.