Closed ShaheedHaque closed 6 years ago
Shouldn't you be tokenising with group_lines()
not tokenise()
? The latter is only used at a micro level for macro definition. It's meant to be so lightweight as to be nearly useless.
Thanks for the kind reply. I'm afraid that I no longer have a usable context in which to try things and provide a useful reply.
Sorry for such a late reply. To be honest, I forgot about this issue. My apologies.
I'm not sure if this is regarded as a bug, but the output form tokenize() is not consumable by expand_macros() because the ".source" attribute is missing. I can workaround it like this:
If the idea is to keep tokens lightweight, perhaps tokenize() could take an optional "source" parameter which, only if not None would be added to the token?