Chris Smith wrote:
Otto Vainio wrote:Yes, I see your point.
I think the problem is not the new lines. It is the fact that I use p_render to render the fields between <ifauth> and </ifauth> tags. Doing it that way causes dw to parse the line as it would be a start of a new list. It does not know that the list has started before the <ifauth> tag. It is easy to test it by using ordered list
- line 1 <ifauth someone> - should be line 2</ifauth> - line 3
This will output 1. line 1
1. should be line 2
1. line 3
Can I set my plugin to parse the page so that after ifauth the ordered list parser gets the lines like this
- line 1
- should be line 2
- line 3
I think the ifauth plugin needs to preprocess the page before it gets handed to the parser. It can then strip <ifauth></ifauth> tags and remove any content that shouldn't be visible. At present there is no neat mechanism for doing preprocessing on the raw wiki text. I could propose a new event wrapped around p_get_instructions which would receive the wiki text as data.
e.g. Name: PARSER_RAW_PARSE (or PARSER_RAW_GENERATEINSTRUCTIONS)
Data: string of raw wiki text to be parsed
Action: parse raw wiki text to generate an instruction list for the renderer
Preventable: yes ??
Signalled by: p_get_instructions()
Notes: after event handlers have an opportunity to modify the instruction list before it is cached/handed to renderer.
Doing things this way would require changing <ifauth> from being a syntax plugin to being an action plugin.
What do you think?
This sounds great. I haven't yet studied event wrappers, but this sounds ok.
Chris
-- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist