obsidian-clipper icon indicating copy to clipboard operation
obsidian-clipper copied to clipboard

code blocks aren't detected and are escaped

Open boneskull opened this issue 10 months ago • 1 comments

I was attempting to clip the contents of this file.

When it arrives in Obsidian (using the custom extension), the contents of the fenced code blocks:

  1. Do not appear as fenced code blocks--instead appearing as plain body text, and
  2. The text contains escapes of various characters (= and * in this example)

For example, the first code block in that document arrives in Obsidian like this (not in a fenced code block):

function \*adder(total\=0) {
   let increment\=1;
   while (true) {
       switch (request \= yield total += increment) {
          case undefined: break;
          case "done": return total;
          default: increment \= Number(request);
       }
   }
}

let tally \= adder();
tally.next(0.1); // argument will be ignored
tally.next(0.1);
tally.next(0.1);
let last\=tally.next("done");
console.log(last.value);  //1.2 instead of 0.3
  • This is macOS and a Chromium-based browser, in case it has something to do with either of those.
  • Using latest Clipper plugin, period note plugin, and Obsidian version as of this writing

boneskull avatar May 02 '24 19:05 boneskull