obsidian-spaced-repetition icon indicating copy to clipboard operation
obsidian-spaced-repetition copied to clipboard

[BUG] Inline flashcard separator conflicts with inline codeblocks

Open rdimaio opened this issue 2 years ago • 0 comments

Describe the bug Hey, first off I'd like to thank you and everyone who contributed to this plugin, it's exactly what I was looking for 😄

I'm facing a similar issue to #76:

I'm using the default :: inline flashcard separator, and I have this inline code (single backticks) in my notes: `typedef std::vector int_vec_t;` which is incorrectly detected by the plugin as a single-line flashcard: image

This problem doesn't occur when I have the code in a multi-line block (triple backticks), like this: ``` typedef std::vector int_vec_t; ```

I had a look at PR #98 and at the current codebase, and I'm not sure where the codeblock parsing is done within the code.

To Reproduce Steps to reproduce the behavior:

  1. Place an inline flashcard separator within an inline code block

Expected behavior The plugin should probably ignore flashcard separators that are within inline code blocks, like it's being done with multi-line code blocks

Versions (please complete the following information):

  • OS: Windows 10
  • Obsidian version: v0.13.19
  • Plugin version: v1.7.1
  • If on desktop, Installer version: "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) obsidian/0.13.14 Chrome/91.0.4472.164 Electron/13.6.2 Safari/537.36"

rdimaio avatar Jan 25 '22 00:01 rdimaio