[GH-ISSUE #3628] [Bug] No backslash to ignore markdown in AppFlowy #1647

Closed
opened 2026-03-23 20:52:13 +00:00 by mirror · 12 comments
Owner

Originally created by @MayurSMahajan on GitHub (Oct 5, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3628

Originally assigned to: @hyj1204 on GitHub.

Bug Description

Appflowy Editor is a markdown editor, we use commonly use markdown shortcuts like double underscores to make text italic, etc.
But right now there is no way to ignore the markdown syntax.
So if a user wants to surround something with two underscores and not make it italic and display it like: _sometext_.
Then it is not possible.

Other markdown editors support the use of the backslash key () to ignore the markdown syntax.

How to Reproduce

  1. Open AppFlowy
  2. Try typing something and wrap it with any markdown character preceded with backslash.
  3. Observe that the markdown is still not ignored.

Expected Behavior

Users should be able to use the backslash key to ignore the markdown syntax if they want.

Operating System

Windows 11

AppFlowy Version(s)

0.3.4

Screenshots

https://github.com/AppFlowy-IO/AppFlowy/assets/47064215/ae7f0b8d-2394-45f4-9ce5-f162447a0c7b

Additional Context

This happens with Styling Markdown syntax
https://docs.appflowy.io/docs/appflowy/product/markdown#styling-text

Originally noticed in #3624

Originally created by @MayurSMahajan on GitHub (Oct 5, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3628 Originally assigned to: @hyj1204 on GitHub. ### Bug Description Appflowy Editor is a markdown editor, we use commonly use markdown shortcuts like double underscores to make text italic, etc. But right now there is no way to ignore the markdown syntax. So if a user wants to surround something with two underscores and not make it italic and display it like: \_sometext\_. Then it is not possible. Other markdown editors support the use of the backslash key (\) to ignore the markdown syntax. ### How to Reproduce 1. Open AppFlowy 2. Try typing something and wrap it with any markdown character preceded with backslash. 3. Observe that the markdown is still not ignored. ### Expected Behavior Users should be able to use the backslash key to ignore the markdown syntax if they want. ### Operating System Windows 11 ### AppFlowy Version(s) 0.3.4 ### Screenshots https://github.com/AppFlowy-IO/AppFlowy/assets/47064215/ae7f0b8d-2394-45f4-9ce5-f162447a0c7b ### Additional Context This happens with Styling Markdown syntax https://docs.appflowy.io/docs/appflowy/product/markdown#styling-text Originally noticed in #3624
mirror 2026-03-23 20:52:13 +00:00
Author
Owner

@PalaniappanC commented on GitHub (Oct 6, 2023):

Hi @MayurSMahajan I would like to work on this issue. Please assign it to me

<!-- gh-comment-id:1750374380 --> @PalaniappanC commented on GitHub (Oct 6, 2023): Hi @MayurSMahajan I would like to work on this issue. Please assign it to me
Author
Owner

@MayurSMahajan commented on GitHub (Oct 6, 2023):

Assigned have fun!

<!-- gh-comment-id:1750376899 --> @MayurSMahajan commented on GitHub (Oct 6, 2023): Assigned have fun!
Author
Owner

@PalaniappanC commented on GitHub (Oct 13, 2023):

Update: I have started working on this. Will provide another update by weekend

<!-- gh-comment-id:1760681686 --> @PalaniappanC commented on GitHub (Oct 13, 2023): Update: I have started working on this. Will provide another update by weekend
Author
Owner

@tmaiaroto commented on GitHub (Oct 27, 2023):

Can markdown parsing be something disabled via config setting? So if off and we want markdown, typing / to bring up the menu to choose a "markdown" option (like code block, image, table, etc. already are today) would switch that block to markdown?

I like the shortcut to avoid having markdown parsed, but I would prefer to disable markdown completely by default and choose when to use it. Most times I just want a very simple text editor.

Also ok with the same backtick shortcut GitHub has, but the problem is you can't edit text in there. In other words, you need to type everything at once. If you go back in between the backticks, you're adding normal text.

The second issue is that markdown is parsed while you are in the middle of the backtick.

So you type ` and then go to type a word with two underscores before you close that backtick and things end up italic inside the red code.

Ultimately the markdown parsing makes it impossible to do anything other than use a code block if you have multiple underscores in a line. It's a way big issue actually. I know I just rattled off what are a few different issues, sorry.

<!-- gh-comment-id:1783153626 --> @tmaiaroto commented on GitHub (Oct 27, 2023): Can markdown parsing be something disabled via config setting? So if off and we want markdown, typing `/` to bring up the menu to choose a "markdown" option (like code block, image, table, etc. already are today) would switch that block to markdown? I like the shortcut to avoid having markdown parsed, but I would prefer to disable markdown completely by default and choose when to use it. Most times I just want a very simple text editor. Also ok with the same backtick shortcut GitHub has, but the problem is you can't edit text in there. In other words, you need to type everything at once. If you go back in between the backticks, you're adding normal text. The second issue is that markdown is parsed while you are in the middle of the backtick. So you type ` and then go to type a word with two underscores before you close that backtick and things end up italic inside the red code. Ultimately the markdown parsing makes it impossible to do anything other than use a code block if you have multiple underscores in a line. It's a way big issue actually. I know I just rattled off what are a few different issues, sorry.
Author
Owner

@MayurSMahajan commented on GitHub (Oct 27, 2023):

Hey @tmaiaroto ! Thanks for your feedback. I will create a separate issue for your feature request. A way to disable and enable markdown feature.

<!-- gh-comment-id:1783196926 --> @MayurSMahajan commented on GitHub (Oct 27, 2023): Hey @tmaiaroto ! Thanks for your feedback. I will create a separate issue for your feature request. A way to disable and enable markdown feature.
Author
Owner

@Xazin commented on GitHub (Oct 29, 2023):

Note for implementation: Use RegExp and use a negative lookbehind for \.

<!-- gh-comment-id:1784201475 --> @Xazin commented on GitHub (Oct 29, 2023): Note for implementation: Use RegExp and use a negative lookbehind for `\`.
Author
Owner

@Xazin commented on GitHub (Oct 29, 2023):

@PalaniappanC Are you still working on this?

<!-- gh-comment-id:1784201604 --> @Xazin commented on GitHub (Oct 29, 2023): @PalaniappanC Are you still working on this?
Author
Owner

@PalaniappanC commented on GitHub (Oct 30, 2023):

Yes @Xazin. Even if not part of hacktoberfest I would like to continue

<!-- gh-comment-id:1784389886 --> @PalaniappanC commented on GitHub (Oct 30, 2023): Yes @Xazin. Even if not part of hacktoberfest I would like to continue
Author
Owner

@PalaniappanC commented on GitHub (Oct 30, 2023):

I am not able to debug the backend code which has the logic for mark down

<!-- gh-comment-id:1784390198 --> @PalaniappanC commented on GitHub (Oct 30, 2023): I am not able to debug the backend code which has the logic for mark down
Author
Owner

@Xazin commented on GitHub (Oct 30, 2023):

I am not able to debug the backend code which has the logic for mark down

All of the markdown parsing happens on the front end, mostly powered by character shortcuts.

There should be no backend work involved in this feature.

<!-- gh-comment-id:1784638000 --> @Xazin commented on GitHub (Oct 30, 2023): > I am not able to debug the backend code which has the logic for mark down All of the markdown parsing happens on the front end, mostly powered by character shortcuts. There should be no backend work involved in this feature.
Author
Owner

@DevaanshPathak commented on GitHub (Dec 8, 2023):

I tried going through the front end but was unable to find the feature. Can someone link the file?

<!-- gh-comment-id:1847238924 --> @DevaanshPathak commented on GitHub (Dec 8, 2023): I tried going through the front end but was unable to find the feature. Can someone link the file?
Author
Owner

@Xazin commented on GitHub (Dec 10, 2023):

I tried going through the front end but was unable to find the feature. Can someone link the file?

Hey Devaansh, this issue is not easy to complete, hence the "good first issue for experienced devs".

There are some implications with the way we implement character shortcuts, and thus this has to be completed in the AppFlowy Editor repository.

One supposed solution would be to implement a generic check for any character shortcut that does transformations (and this would require the character shortcut to have a flag that is a promise that they do a transformation), and then if they have this flag, don't run the character shortcut if it is canceled by the backslash.

<!-- gh-comment-id:1849073987 --> @Xazin commented on GitHub (Dec 10, 2023): > I tried going through the front end but was unable to find the feature. Can someone link the file? Hey Devaansh, this issue is not easy to complete, hence the "good first issue for **experienced devs**". There are some implications with the way we implement character shortcuts, and thus this has to be completed in the AppFlowy Editor repository. One supposed solution would be to implement a generic check for any character shortcut that does transformations _(and this would require the character shortcut to have a flag that is a promise that they do a transformation)_, and then if they have this flag, don't run the character shortcut if it is canceled by the backslash.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#1647
No description provided.