-
-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with parsing nested Blocks #816
Comments
You should go over the top-level blocks returned by the |
Thanks for the answer. If i understand your solution right, that is how I do it right now. I was just wondering if I could insert them while parsing the document by putting their renderer first and then telling the parser to parse the span of my section block and inserting everthing to the section instead of the main document. |
I'm not sure to understand this question as well, sorry 😅 I'm confused by "parsing the document by putting their renderer first", there is no such thing as a rendering involved during the parsing. If you would like to process the blocks on the fly, this is not possible. You have to parse the document, rework the blocks, and then you can render the updated document (after adding a renderer for the |
I'm sorry I meant to write put the section parser first, then find the sections and then parse the sections for other blocks. I basically woke op from the GitHub notification so my brain was not quite there 😅 . Btw thank you for your amazing library. |
How is defined a section in markdown in your text? (I thought you were recovering sections from e.g markdown Headings e.g |
I basically made my own heading block as it needed to support the syntax without the space after the # and some other custom syntax. So my thought was to use my current Custom heading block parser to find the beginning of each section and then inserting a heading into my section by default. Then I would search for the next heading of the same or a higher level and end the section there. |
The problem with this is that I dont know if I can make my parser, parse the content of the section blocks and attach it to the section it is parsing. |
Hello,
I'm trying to create an extension that divides my text into sections between every heading. For this I want to find the extend of each section block and then continue to parse the section, appending all the parsed blocks to my section. Is there a block that does something similar already I could look at for guidance? So far I have only had success with manually appending blocks to Containerblocks.
The text was updated successfully, but these errors were encountered: