Forem: Inline code with double backslash becomes single if it is part of nested bullet list

Created on 2 Apr 2019  路  3Comments  路  Source: forem/forem

Describe the bug

Double backslash inside code blocks in nested listing results in single backslash instead of two.

To Reproduce

From any post/comment, try these non-nested and nested bullet lists:

* foo
* use `\\1`, `\\2`, etc

---

* foo
    * baz
* use `\\1`, `\\2`, etc

Expected behavior

Double backslash shouldn't become single, as shown below for GitHub markdown rendering:

  • foo

    • baz

  • use \\1, \\2, etc

Screenshots

Screenshot for above non-nested (correctly rendering) and nested list (incorrect):

nested_bullet_double_backslash

Not sure if this is related to: https://github.com/thepracticaldev/dev.to/issues/960

publishing experience ready for dev ruby bug

All 3 comments

I'm happy to pick this issue up if it's still one the maintainers want done.

@danascheider please go ahead and thank you! I'm going to assign the issue to you

It appears this bug is in the Redcarpet gem, not in dev.to code. I've submitted an issue report against Redcarpet to ask if they'd accept a PR. Unfortunately, the last commit merged on Redcarpet was almost a year ago, and the last time a maintainer responded to an issue report or merged a PR was in January of 2019. The most recent commit to the repository was when version 3.5.0 was released back in July. So basically, there's nothing more I can do with this issue on this codebase unless either (1) the maintainers of Redcarpet accept a PR and release a new version or (2) we want to switch to a different library. Point (2) would probably not be a bad idea if the library we're using isn't being actively maintained anymore, especially since properly escaping HTML is pretty important for security.

So that's where we're at with this - please just let me know how you'd like me to proceed. I'm happy to make a Redcarpet PR in the unlikely event the maintainers respond to my issue report soon, and I could also take on at least some of the work if you want to instead switch to a different library.

EDIT: Turns out the problem is in the C extensions to Redcarpet so that may not be a PR I can make since I don't know C :(

Was this page helpful?
0 / 5 - 0 ratings