fragmentize(text,
wiki_elements,
element_store,
remove_escapes=True)
| source code
|
Takes a string of wiki markup and outputs a list of genshi
Fragments (Elements and strings).
This recursive function, with help from the WikiElement objects,
does almost all the parsing.
When no WikiElement objects are supplied, escapes are removed from
text (except if remove_escapes=True) and it is
returned as-is. This is the only way for recursion to stop.
- Parameters:
text - the text to be parsed
wiki_elements - list of WikiElement objects to be searched for
remove_escapes - If False, escapes will not be removed
|