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

More selective escaping of -#.) (alternative approach) #149

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Commits on Oct 2, 2024

  1. More selective escaping of -#.) (alternative approach)

    This is a partial alternative to matthewwithanm#122 (open since April) for more
    selective escaping of some special characters.
    
    Here, we fix the test function naming (as noted in that PR) so the
    tests are actually run (and fix some incorrect test assertions so they
    pass).  We also make escaping of `-#.)` (the most common cases of
    unnecessary escaping in my use case) more selective, while still being
    conservatively safe in escaping all cases of those characters that
    might have Markdown significance (including in the presence of
    wrapping, unlike in matthewwithanm#122).  (Being conservatively safe doesn't include
    the cases where `.` or `)` start a fragment, where the existing code
    already was not conservatively safe.)
    
    There are certainly more cases where the code could also be made more
    selective while remaining conservatively safe (including in the
    presence of wrapping), so this is not a complete replacement for matthewwithanm#122,
    but by fixing some of the most common cases in a safe way, and getting
    the tests actually running, I hope this allows progress to be made
    where the previous attempt appears to have stalled, while still
    allowing further incremental progress with appropriately safe logic
    for other characters where useful.
    jsm28 committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    a369e07 View commit details
    Browse the repository at this point in the history