Skip to content

Add a method that returns information about the block a given line belongs to #42

Description

@aplteam

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:

  1. A ref pointing to a variable with the markdown
  2. An index (single positive integer) pointing into the variable: the current row

It should return two positive integers:

  1. Starting row: where does the block start the given index is part of
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions