Skip to content
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

Add code block inline marking, including ins & del marker types #1160

Merged
merged 11 commits into from
Aug 2, 2022
Prev Previous commit
Next Next commit
Fix markers ending at the end of the line
hippotastic committed Jul 31, 2022
commit 660aa10a1dd95c58b5aa398b48a811cdcdd37dc4
3 changes: 2 additions & 1 deletion src/components/CodeSnippet.astro
Original file line number Diff line number Diff line change
@@ -250,8 +250,9 @@ function textPositionToTokenPosition(tokens: InlineToken[], textPosition: number
}
}

// If we arrive here, the position is after the last token
return {
tokenIndex: tokens.length - 1,
tokenIndex: tokens.length,
innerHtmlOffset: 0,
};
}