[geeklog-devel] Current status of using curly braces in story body?

Dirk Haun dirk at haun-online.de
Tue Jan 24 16:24:24 EST 2012


Dan Stoner wrote:


> I've been trying to use curly braces inside a story body, basically

> wanting to show some script (bash shell expansion).


As soon as you want to display code, you should use the [code] or [raw] tags. Those aren't perfect either, but at least the goal is for them to make them display everything verbatim, without being interpreted.



> I found links to this bug:

>

> http://project.geeklog.net/tracking/view.php?id=1005


That's the "not perfect" bit …



> And a few other forum posts about curly braces.


Depends on where they are used. Curly braces are used for variables by the template engine. So something like {word} would - when run through the template engine - be considered a variable named "word" and would be replaced with its current value. Most of the time, that value would be empty and the entire construct will simply disappear.

Workaround: Add spaces: { word }

If it's code (JavaScript, CSS, etc.) it should still work with the spaces.



> I thought I had curly braces working at one point (possibly with GL

> 1.7.1) but maybe it wasn't, or maybe there was a regression in 1.8.0+.


There was an issue with the handling of curly braces in blocks (only there) in 1.7.0 that was fixed in 1.7.1. I don't think anything else changed recently.



> Can anyone shed some light on this?



Did that help?

bye, Dirk


--
http://www.themobilepresenter.com/



More information about the geeklog-devel mailing list