Skip to content

Alternative to unicode property escapes regular expression? #2339

@rfgamaral

Description

@rfgamaral

Hi there 👋

We started to use marked in one of our products, and one of our users mentioned that our product stopped working for them very recently. They are on an older Firefox version (with some enterprise policy in place preventing them from upgrading) which does not have support for RegExp: Unicode property escapes, which in turn is being used here:

marked/src/Tokenizer.js

Lines 571 to 572 in 9396896

// _ can't be between two alphanumerics. \p{L}\p{N} includes non-english alphabet/numbers as well
if (match[3] && prevChar.match(/[\p{L}\p{N}]/u)) return;

I'm not familiar with this RegExp feature, and if there are any viable alternatives to this, so that marked could support older browser versions (assuming that you care about supporting browser versions that old). So, I guess my question is, is this something that we could, eventually, expect a fix for, or should we see this as one of those "won't fix" issues?

Have an awesome 2022 everyone 🎉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions