mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-09 21:42:15 +00:00
Translate position from rendered HTML to markdown #654
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @joshua211 on GitHub (Feb 12, 2024).
Hello, I have the following usecase:
I have an editor that can edit the rendered html (after parsing the markdown). I want to get the correct
MarkdownObjectfor the rendered html in my editor. The cursor position from the editor is slighty off, due to missing characters from the original markdown, which are not rendered. Here is an example:The cursor is at position 25, the
Blockthat gets returned fromFindBlockAtPositionreturns the previousblocwith a span from 0-24.How should i go about translating the UI position to the original markdown position?
@xoofx commented on GitHub (Feb 13, 2024):
Not sure it will be possible to do anything, but it would be better to have a simple
Program.cshere that demonstrates the issue.