Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1368 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

Add a way to specify Kid output formats

Reported by: chrisz Owned by: chrisz
Priority: normal Milestone: 1.0.3
Component: Kid Version: 1.0.1
Severity: normal Keywords: format outputformat kid


As discussed  here: Since version 0.9.4, Kid supports different "output formats" (e.g. "simple_blanks" for stripping duplicate whitespace, using "educated" quotes etc.), but these are not yet supported by TurboGears (TurboKid?).

Also, the name of the config setting kid.outputformat is a bit confusing in this context, since it specifies the Kid output method (html, xhtml etc.) not the output format. (The name had been chosen at a time when Kid did not have the output format feature.)

Suggestion: Allow kid.outputformat to be a 2-tuple where the 1st component is the output method as before, and the 2nd component is the Kid output format:

   kid.outputformat = "html-strict", "compact+nice"

As an alternative syntax, the output format could be simply separated by a space (since the output methods do not contain spaces):

   kid.outputformat = "html-strict compact+nice"

If kid.outputformat is a string without blanks, it will be treated as before, i.e. it will specify the Kid output method, and the Kid output format will be "default".

Change History

comment:1 Changed 12 years ago by alberto

  • Milestone changed from 1.0.2 to 1.0.3

comment:2 Changed 12 years ago by faide

+1 for this idea. Nice to have...

comment:3 Changed 12 years ago by chrisz

I've just checked in the necessary changes for TurboKid? in r3240. We need to release this as TurboKid? 1.0.2 so this feature can be used with TurboGears. But before this, we need to wait for Kid 0.9.6 which is now required for TurboKid? because of several important bugfixes. Should hopefully happen very soon, the release notes have already been written.

comment:4 Changed 12 years ago by faide

  • Owner changed from anonymous to chrisz

comment:5 Changed 12 years ago by faide

A really helpful thing to have is a documentation explanation in the wiki about this feature so people now it exists.

comment:6 Changed 12 years ago by chrisz

Still waiting for Kid 0.9.6, but since David Stanek has already announced it on the list, it shouldn't take long. I'll also add docs and unittests then. (Leaving this ticket open as a reminder.)

comment:7 Changed 12 years ago by chrisz

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

Kid 0.9.6 and TurboKid? 1.0.2 with this feature are now available.

Note: See TracTickets for help on using tickets.