Skip to content

Commit

Permalink
fix: Fixes clicking on a section/table roller in LP enters the source (
Browse files Browse the repository at this point in the history
…close #283)
  • Loading branch information
valentine195 committed Jan 3, 2024
1 parent 74d33c6 commit 43e93d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/live-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function inlineRender(view: EditorView, plugin: DiceRollerPlugin) {
const end = node.to;
// don't continue if current cursor position and inline code node (including formatting
// symbols) overlap
if (selectionAndRangeOverlap(selection, start, end + 1)) return;
if (selectionAndRangeOverlap(selection, start, end )) return;


const original = view.state.doc.sliceString(start, end).trim();
Expand Down
3 changes: 2 additions & 1 deletion src/roller/section.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ export class SectionRoller extends GenericEmbeddedRoller<RollerCache> {

continue;
}
MarkdownRenderer.renderMarkdown(
MarkdownRenderer.render(
app,
this.displayFromCache(result),
ret.createDiv(),
this.source,
Expand Down

0 comments on commit 43e93d7

Please sign in to comment.