Imagine a user is editing a large markdown document. She changes a line in the document and then wants the editor to update a preview. Currently the whole document must be converted. That can result in a significant delay depending on the size of the document.
With the proposed method, only the affected block could be rendered again, which should result in a significant performance improvement.
Such a method requires two arguments:
- A ref pointing to a variable with the markdown
- An index (single positive integer) pointing into the variable: the current row
It should return two positive integers:
- Starting row: where does the block start the given index is part of
- Number of rows: size of that block
This would be very useful for updating only one block in a large document rather than the whole document.
Imagine a user is editing a large markdown document. She changes a line in the document and then wants the editor to update a preview. Currently the whole document must be converted. That can result in a significant delay depending on the size of the document.
With the proposed method, only the affected block could be rendered again, which should result in a significant performance improvement.
Such a method requires two arguments:
It should return two positive integers:
This would be very useful for updating only one block in a large document rather than the whole document.