Modify ↓
Opened 5 months ago
Last modified 5 months ago
#13766 assigned defect
Spaces in diff hunks incorrectly rendered
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.1 |
Component: | rendering | Version: | |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I noticed that spaces in diff hunks are incorrectly rendered in #13764.
diff --git a/trac/util/daemon.py b/trac/util/daemon.py index 3a2db5c27..984025825 100644 --- a/trac/util/daemon.py +++ b/trac/util/daemon.py @@ -53,7 +53,7 @@ def daemonize(pidfile=None, progname=None, stdin='/dev/null', # Perform first fork pid = os.fork() if pid > 0: - sys.exit(0) # exit first parent + os._exit(0) # exit first parent # Decouple from parent environment os.chdir('/') @@ -63,7 +63,7 @@ def daemonize(pidfile=None, progname=None, stdin='/dev/null', # Perform second fork pid = os.fork() if pid > 0: - sys.exit(0) # exit second parent + os._exit(0) # exit second parent # The process is now daemonized, redirect standard file descriptors for stream in sys.stdout, sys.stderr:
Two spaces between os._exit(0)
and # exit ...
are rendered like single space (checked with Firefox, Google Chrome).
Attachments (1)
Change History (2)
by , 5 months ago
Attachment: | screenshot-diff-div.png added |
---|
comment:1 by , 5 months ago
Note:
See TracTickets
for help on using tickets.
Proposed changes in [8de52d27d/jomae.git]. We could use
white-space: preserve-spaces
and remove replacing spaces with
s.Also, according to trac.mimeview.patch, similar rendering diff hunks exists in both trac.mimeview.patch and trac.versioncontrol.diff. I'll try to share/remove duplicated code.