Re-2: Tabs for pier
renggli at iam.unibe.ch
Wed Apr 5 13:18:42 MEST 2006
> With some easy things in css I was able to realize what I want in
> HTML. But what do you think about syntax extension of pier to do
> such things like
> I found this behavior in another wiki and it helps for readability
> of the text.
> Sure I can use HTML but writing of such things written above is
> much easier.
I tried to keep the syntax as simple as possible. However there were
several requests lately for that kind of things. I don't really know,
how we could implement that the simplest without bloating the wiki-
syntax and while keeping the visitors small that transform the AST
into different output-formats (HTML, Text, Latex, etc).
The best idea I cam up so far is to add some sort of XML-Tags that
can be parsed in a generic fashion, so that extensions can register
their own tags. Something along ...
The time is now: <pier:smalltalk>Time now</pier:smalltalk>
Would that help? Is something like that of generic interest?
> I've been searching in the code for the place of translation from
> *..* and others to HTML and coming down to PRDocumentScanner
> scanForToken and see the scannerDefinitionComment on class-side.
> The next step to define a new element would be very interesting.
The scanner and parser is automatically generated from the respective
definitions using SmaCC, so you probably don't want to change these
methods manually ;-)
If you only want to do some simple string transformations when
generating HTML you could simply patch the methods from the protocol
#visiting-document in the class PRViewRenderer.
More information about the SmallWiki