Posted By: Brian Wisti
Date: 2006-03-04 04:35
Summary: PageTemplate 2.2.0
Project: PageTemplate
First, the important stuff. I tuned up the code in the include functionality so that relative and absolute filepaths were dealt with correctly.
I admit it. I caved. PageTemplate now has a DefineCommand, allowing you to assign simple string values to a key in the template's output namespace. It's experimental, unstable, and unwieldy. I still don't know if I want to keep it in there, since there are all sorts of untested issues. But hey, somebody asked for it, and I provided.
There's also a FilterCommand, allowing you to apply a Preprocessor filter to a block of text in the template itself. Yes, now you can reverse paragraphs without any help from your code. I was actually using it for some Textile filtering in my templates, though. I like FilterCommand, but it needs to be cleaned up too.
Other than that, I'm working on some major changes to the internals of PageTemplate, which will end up in a 3.0 somewhere down the line.
2.2.0:
Bugfixes:
FileSource#get_filename couldn't consistently work with
relative or absolute filenames on Windows.
Report by: Robert Hicks
Changes:
Added DefineCommand class allowing users to set values from
inside a template. This is experimental and aesthetiscally
unpleasant. I may do away with it entirely if I get in a
mood.
Added '[%define var value%]' syntax to DefaultGlossary
Parser.initialize can now accept a Hash as the 'namespace' arg
Added FilterCommand for preprocessing raw text blocks in the
template.
FilterCommand#output will have its contained commands parsed. |
|