Skip to content

Commit

Permalink
Live Markdown for web follow-up 2 (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid authored Aug 28, 2024
1 parent 356f4b4 commit f060c8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/utils/parserUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function addParagraph(node: TreeNode, text: string | null = null, length: number
/** Builds HTML DOM structure based on passed text and markdown ranges */
function parseRangesToHTMLNodes(text: string, ranges: MarkdownRange[], markdownStyle: PartialMarkdownStyle = {}, disableInlineStyles = false) {
const rootElement: HTMLMarkdownElement = document.createElement('span') as HTMLMarkdownElement;
const textLength = text.replace(/\n/g, '\\n').length;
const textLength = text.length;
const rootNode: TreeNode = {
element: rootElement,
start: 0,
Expand Down

0 comments on commit f060c8e

Please sign in to comment.