Comments
-
Greg Hurrell
Just so I can get an idea of what you're trying to achieve here, can you show me what you want your markup to look like (before and after)?
-
Greg Hurrell
In the absence of further input I'm going to mark this one as closed for a couple of reasons.
There really is no "between" moment after sanitization and the rest of the processing. This is because there is only a single pass through the input text, and the HTML is emitted along the way. For example, as soon as the translator sees
''
it immediately emits<em>
. As soon as it sees[[
it knows it's going to emit a link and so gobbles up the needed tokens and emits it immediately. It's the same for other tokens, and an essential part of the design given that it's all about speed. Basically with this architecture there can never really be a hooks into the middle of the translation process; we can do pre-processing and post-processing, but nothing in the middle because it's an indivisible pass.If you want to add support for definition lists, the right way to do it would be to support them as first-class citizens (ie. with built-in support for syntax). As
*
and#
are already used for unordered (unnumbered) and ordered (numbered) lists, a new symbol would be needed. -
Greg Hurrell
Status changed:
- From: new
- To: closed
-
August Lilleaas
Created
,
edited
The markup is something like this:
# before foo:: bar baz:: maz # after <dl> <dt>foo</dt> <dd>bar</dd> <dt>baz</dt> <dd>maz>/dd> </dl>
Does "built in support for syntax" mean having to write C code? I'm not fluent with C at all.
-
Greg Hurrell
Yeah, that's what it means.
Can you show what the syntax would look like when the term contains a space? (ie. "foo bar" instead of "foo")
I wonder if something like this might be better:
::term 1: a definition ::term 2: another definition
-
Greg Hurrell
Or perhaps for symmetry:
::term 1:: foo ::term 2:: bar
Add a comment
Comments are now closed for this issue.