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

markdown characters not escaped in new editor #558

Closed
tech4him1 opened this issue Aug 28, 2017 · 1 comment · Fixed by #567
Closed

markdown characters not escaped in new editor #558

tech4him1 opened this issue Aug 28, 2017 · 1 comment · Fixed by #567

Comments

@tech4him1
Copy link
Contributor

- Do you want to request a feature or report a bug?
bug, caused by #254

- What is the current behavior?
If a user types (#) pound character(s) at the beginning of a line in the regular editor, then switches to the markdown editor (and edits anything), the editor will convert the line to a heading.

- If the current behavior is a bug, please provide the steps to reproduce.

  1. In the regular editor, add a line like this: ## this is a test.
  2. Switch to the markdown editor and change any line (doesn't have to be the same line).

- What is the expected behavior?
The pound sign should be escaped, like in the old editor (\## this is a test).
We should probably check all other special MD characters as well.

@tech4him1 tech4him1 changed the title #(pound) characters not escaped in new editor # (pound) characters not escaped in new editor Aug 28, 2017
@erquhart
Copy link
Contributor

erquhart commented Aug 28, 2017

Great catch - we need to escape any markdown characters entered in the visual editor, we're currently escaping none of them.

Characters to always escape: _, *, (backtick), [
Characters to escape when at the beginning of a block: #, -
Characters to escape when more than one present: ~

@tech4him1 tech4him1 changed the title # (pound) characters not escaped in new editor markdown characters not escaped in new editor Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants