Modify ↓
Opened 9 years ago
Closed 6 years ago
#12731 closed defect (worksforme)
Some Blank Lines in Shell Scripts are Dropped
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | IncludeMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
Very useful plugin.
I'm including a bash script from my Git repository. It looks great, but only the blank line right after the shebang is displayed. All of the later blank lines in the file are dropped. I'm calling the macro thus:
[[Include(source:repo/path/to/script@b2cb8e4c, application/x-shellscript)]]
Attachments (0)
Change History (4)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
Possible fix that I received by email:
-
includemacro/macros.py
189 189 190 190 # Escape if needed. 191 191 if not self.config.getbool('wiki', 'render_unsafe_content', False): 192 out = to_unicode(out) 192 if source_format in ('source', 'browser', 'repos'): 193 out = out.render(encoding=None, strip_whitespace=False) 194 else: 195 out = to_unicode(out) 193 196 try: 194 197 out = HTMLParser(StringIO(out)).parse() | HTMLSanitizer() 195 198 except ParseError:
comment:3 Changed 7 years ago by
Status: | new → accepted |
---|
comment:4 Changed 6 years ago by
Resolution: | → worksforme |
---|---|
Status: | accepted → closed |
I cannot reproduce in Trac 1.0-stable, 1.2-stable or trunk. Please provide your Genshi version, and whether you are running with or without speedups.
Note: See
TracTickets for help on using
tickets.
#13386 closed as a duplicate.