Edgewall Software

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#118 closed defect (worksforme)

Text Template issue

Reported by: lj@… Owned by: cmlenz
Priority: minor Milestone:
Component: Template engine plugin Version: 0.4
Keywords: Cc:

Description

The white space for this text template doesn't seem to be displaying correctly? I am using OS X 10.4.9 Python 2.5 genshi 0.4.

txt = """
This is a $test
to see if the white space

works

correctly

"""

from genshi.template import TextTemplate
tmpl = TextTemplate(txt)
stream = tmpl.generate(test='world')
print stream.render()

Change History (2)

comment:1 Changed 17 years ago by cmlenz

  • Resolution set to worksforme
  • Status changed from new to closed

You need to use:

print stream.render('text')

Otherwise, XML serialization is used, which strips whitespace.

comment:2 Changed 17 years ago by cmlenz

  • Milestone 0.4.1 deleted
Note: See TracTickets for help on using tickets.