Edgewall Software

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#366 closed enhancement (wontfix)

Markup objects passed as parameters to the template should be inserted into the stream as stream events

Reported by: carsten.klein@… Owned by: cmlenz
Priority: minor Milestone:
Component: Template processing Version: 0.5.1
Keywords: Cc:

Description

I am currently facing a problem in customizing trac, where I want to rewrite certain urls in the generated page *). However, using ITemplateStreamFilter, I am not directly able to match content rendered for example by the Wiki component as part of the data that will be merged into the Genshi template.

That data, mostly objects of type Markup, will be marked in the stream as for being text:

(None, ('TEXT', <Markup u'<h2 id="About">About</h2>\

It would be nice to have Template, on generate(), to automatically resolve these markup injections and therefore extend the stream by the events that these injected markups represent.

I do not currently know of any implications towards simple Text based templates, though.

I am currently using Genshi-0.6dev_r0, but I cannot find it in the version list. Therefore I will simply use the latest available version.

*) by not "being directly able" I mean that I would first have to filter on the existing text-nodes of a given div having class attr of for example 'wikipage'. Then I would have to instantiate a new Markup object from out of that, and, after that I would have to remove the existing text nodes and insert the markup instead. This, however, can be rather time consuming and complicated, given the complexity of the events in the stream and the fact, that multiple such ITemplateStreamFilters or similar extensions will iterate over the same or modified content.

Change History (3)

comment:1 Changed 14 years ago by cmlenz

  • Milestone changed from 0.5.2 to 0.6

Milestone 0.5.2 deleted

comment:2 Changed 14 years ago by cmlenz

  • Milestone 0.6 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

That is really a problem in Trac, which needs to move away from generating Markup output in the wiki formatting, and rather output a markup stream instead.

Note: See TracTickets for help on using tickets.