Skip to content

Commit

Permalink
Fix inline code right spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurankv committed Nov 27, 2023
1 parent 640265b commit d3ecc75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/ReadingView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ async function remakeInlineCode(inlineCodeElement: HTMLElement, plugin: CodeStyl
const {parameters,text} = parseInlineCode(inlineCodeText);
if (parameters) {
inlineCodeElement.innerHTML = await getHighlightedHTML(parameters,text,plugin);
inlineCodeElement.innerHTML = inlineCodeElement.innerHTML + "​";
inlineCodeElement.classList.add("code-styler-inline");
const parameterString = inlineCodeText.substring(0,inlineCodeText.lastIndexOf(text));
inlineCodeElement.setAttribute("parameters",parameterString); // Store parameter string as attribute so original text can be restored on plugin removal
Expand Down

0 comments on commit d3ecc75

Please sign in to comment.