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

Code blocks/fences within Admonitions render multiple times #2614

Closed
zambawamba opened this issue Nov 16, 2018 · 8 comments
Closed

Code blocks/fences within Admonitions render multiple times #2614

zambawamba opened this issue Nov 16, 2018 · 8 comments
Labels
bug 🐛 Issue concerns a bug.

Comments

@zambawamba
Copy link

Current behavior

Using code blocks within an admonition renders three copies of the block, weirdly enough twice before the description and once after. See screenshot for details.

boostnote_admonition_bug

I tried removing the code fence HTML definition but that doesn't make any difference.
The only console errors are about some plantUML issue. I tried removing all plantUML sections from the note on the off chance that it was related but that didn't make any difference either.

Expected behavior

Only one code block should be rendered, the one after the description.

Steps to reproduce

  1. Define admonition.
  2. Insert code fence into admonition.
  3. :(

Environment

  • Version : 0.11.11
  • OS Version and name : macOS 10.13.6 High Sierra
@zambawamba zambawamba changed the title Code block/fence within Admonitions render multiple times Code blocks/fences within Admonitions render multiple times Nov 16, 2018
@zambawamba
Copy link
Author

zambawamba commented Nov 16, 2018

Update

I checked on a different machine that was still running version 0.11.10 and the admonition code block was rendering fine. I then updated to 0.11.11 to check whether the bug was introduced by the update, but it's still working on this laptop.

boostnote_admonition_update

Edit: Might be related to #2613. My other code blocks are rendering fine though.

@sharif1093
Copy link

I have the same issue on 0.11.11.
However, it renders just fine if I insert an empty line between the text and the code block.

@zambawamba
Copy link
Author

Yup, that fixes it for me too. After a restart I was able to reproduce the bug on both systems, even though it worked fine one of them before. ¯_(ツ)_/¯
But the empty line is an easy workaround.

@skynyrd
Copy link

skynyrd commented Nov 17, 2018

Came to here to report the same bug.

The bug can be reproduced by:

  1. Creating a markdown file
  2. Put these inside:
    1. * A
    2. * B
    3. Empty Line
    4. Code block

@kyan001
Copy link

kyan001 commented Nov 18, 2018

image
image

@daiyam
Copy link
Contributor

daiyam commented Nov 18, 2018

Sorry, I'm the sinful who have made the bug. 😭
It've just created the PR #2622 to fix it. 😔

@wAuner
Copy link
Contributor

wAuner commented Nov 26, 2018

I have this bug as well in 0.11.11 on mac. Happens on all my notes

screenshot 2018-11-26 at 16 28 26

screenshot 2018-11-26 at 16 27 30

@daiyam
Copy link
Contributor

daiyam commented Nov 26, 2018

@wAuner sorry about that. The fix has been merged into the master branch so it will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Issue concerns a bug.
Projects
None yet
Development

No branches or pull requests

7 participants