Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$ can't be rendered in notes #219

Open
dzelemba opened this issue Feb 19, 2021 · 5 comments · May be fixed by #618
Open

$ can't be rendered in notes #219

dzelemba opened this issue Feb 19, 2021 · 5 comments · May be fixed by #618
Labels
needs-review Need peer testing/review (prolly a bug)

Comments

@dzelemba
Copy link

I've tried $ and \$ and `$`, but the dollar sign get's replaced with \( in all cases due to the math formatting. Is there a syntax I'm missing?

@safwansamsudeen
Copy link

I have this problem, too. Sometimes, it seems to repeat the phrase before:
Question in Obsidian:

Q: What does a dollar symbol `$` do in regex? #TopicRegex 
A: It's used to search for patterns at the end of strings. For example, `story$` will only match strings that end with `'story'`. This symbol is known as the *anchor character*.
<!--ID: 1623834043892-->

Rendering in Anki:

Topics/Regex.md > FCC - Front End Development Libraries

What does a dollar symbol `What does a dollar symbol do in regex? #TopicRegex
It's used to search for patterns at the end of strings. For example, storyIt's used to search for patterns at the end of strings. For example, will only match strings that end with'story'`. This symbol is known as the anchor character.

Obsidian

@wujun001
Copy link

wujun001 commented Jan 23, 2024

Can the dollar symbols in the code block, such as ``` $$``` or `$`, be kept as they are,thanks

@wujun001
Copy link

@Pseudonium

@ShootingKing-AM ShootingKing-AM added the needs-review Need peer testing/review (prolly a bug) label Jan 23, 2024
@victorfeight
Copy link

Yes, this behavior is very distracting.

@envico801
Copy link

I ran into this error today. I left a possible solution in #618

    // decensor(note_text, mask, replacements, escape) {
    //     for (let replacement of replacements) {
    //         note_text = note_text.replace(mask, escape ? escapeHtml(replacement) : replacement);
    //     }
    //     return note_text;
    // }
    
   decensor(note_text, mask, replacements, escape) {
        let i = 0;
        return note_text.replace(new RegExp(mask, 'g'), () => {
            let replacement = replacements[i++];
            return escape ? escapeHtml(replacement) : replacement;
        });
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review Need peer testing/review (prolly a bug)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants