Skip to content

Recording the starting cursor position of each token? #402

Description

@omriperl

Hello,
I created a custom renderer that extends MarkdownRenderer.
When I encounter a list element (via the def list(self, token: dict[str, Any], state: BlockState) -> str: overridden function)
I would like to get the full raw text of that list (everything inside the list including any nested lists/etc...),
but, I don't see any support for that currently.

I thought that if I could get the start position of each token I can calculate it...

Is it possible in some way to extend BlockParser to support this? Maybe there's another possible approach to achieve what I need?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions