omnivore-app / logseq-omnivore

Logseq plugin to fetch articles and highlights from Omnivore
MIT License
278 stars 15 forks source link

Feature Request: Replace Double Backslashes with Single Backslashes #141

Open vanabel opened 8 months ago

vanabel commented 8 months ago

Issue Description: I'm currently using the plugin in Logseq to sync RSS content. However, I've encountered an issue where double backslashes (\\) in the fetched content are not properly handled and displayed as-is in Logseq. This creates readability issues, and I'd like to request a feature enhancement to replace double backslashes with single backslashes.

Steps to Reproduce: write an email to omnivore mail address with content:

Hi, this is a test of math:
in line math $\int_a^b f'(x)dx=f(b)-f(a)$; another delimiter \(\int_a^b f'(x)dx=f(b)-f(a)\)
The display form:
$$
\int_a^b f'(x)dx=f(b)-f(a)
$$
and another delimiter
\[
\int_a^b f'(x)dx=f(b)-f(a)
\]
Did this work?
  1. read the email on https://omnivore.app and hi-light it
  2. go to logseq, sync the recent hilights, you will see:
    > Hi, this is a test of math: in line math $\\int_a^b f'(x)dx=f(b)-f(a)$; another delimiter (\\int_a^b f'(x)dx=f(b)-f(a)) The display form: $$ \\int_a^b f'(x)dx=f(b)-f(a) $$ and another delimiter \[ \\int_a^b f'(x)dx=f(b)-f(a) \] Did this work?

Expected Behavior: Since the command like \int is for math formula, which will be handed by mathjax/katex in logseq. It should keep the form what it is originally looks like. That is, after the sync process, I expect the double backslashes (\\) in the fetched content to be replaced with single backslashes (\) in Logseq.

Actual Behavior: (Current behavior - explain what happens now) The command \int is transformed into \\int.

Issue Type:

Priority:

Please let me know if you need any additional information or if there's anything else I can provide to help address this issue. Thank you for your attention to this matter.