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

An extra space is added after three backticks when switching from WYSIWYG to Markdown #186

Closed
yihui opened this issue May 17, 2018 · 7 comments

Comments

@yihui
Copy link

yihui commented May 17, 2018

Version

1.1.0

Test Environment

Google Chrome on macOS, with the example https://nhnent.github.io/tui.editor/api/latest/tutorial-example01-basic.html

Current Behavior

Add a code block to the editor:

```js
var x = 1;
```

Switch to the WYSIWYG mode, then switch back the Markdown mode. An extra space is inserted bewteen the three backticks and js:

``` js
var x = 1;

```

And note that a blank line is also added before the closing fence (the last three backticks), which is also unnecessary.

Expected Behavior

No spaces after the three backticks.

@sohee-lee7
Copy link
Contributor

@yihui Sorry for late reply. This issue does not occur in the latest version so close it.

@yihui
Copy link
Author

yihui commented Feb 21, 2019

No worries. Thank you!

BTW, I guess the documentation website still uses an old version, since the issue is currently still reproducible at https://nhnent.github.io/tui.editor/api/latest/tutorial-example01-basic.html.

@sohee-lee7
Copy link
Contributor

@yihui I just reproduced that a blank line is added before the closing backticks. Currently it does not occur but issue that an extra space is inserted before js occur in the latest version. But I think it is not important bug so I will consider this issue after resolved other important issues.

@seonim-ryu
Copy link
Member

This issue seems to be resolved. Currently I can't reproduce. So close the issue. If you can reproduce it, I'd like to upload a screenshot with gif.

@yihui
Copy link
Author

yihui commented Dec 19, 2019

It is still reproducible, at least on this page: https://ui.toast.com/tui-editor/ (Click "All Extensions")

Markdown mode

image

Switch to WYSIWYG mode

image

Switch back to Markdown mode

Now you see the extra space:

image

@seonim-ryu
Copy link
Member

@yihui
I understand the issue you said. First, I don't know exactly why the space was added between the code block syntax(three backticks) and the language name. By the way, this syntax is not a bug because it does not violate CommonMark specification.

@yihui
Copy link
Author

yihui commented Dec 30, 2019

Okay. Thank you very much anyway!

seonim-ryu pushed a commit that referenced this issue Feb 5, 2020
seonim-ryu pushed a commit that referenced this issue Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants