BoostNote-Legacy icon indicating copy to clipboard operation
BoostNote-Legacy copied to clipboard

Code blocks/fences within Admonitions render multiple times

Open zambawamba opened this issue 8 years ago • 8 comments

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 avatar Nov 16 '18 16:11 zambawamba

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.

zambawamba avatar Nov 16 '18 18:11 zambawamba

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.

sharif1093 avatar Nov 16 '18 23:11 sharif1093

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.

zambawamba avatar Nov 16 '18 23:11 zambawamba

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

skynyrd avatar Nov 17 '18 00:11 skynyrd

image image

kyan001 avatar Nov 18 '18 06:11 kyan001

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

daiyam avatar Nov 18 '18 23:11 daiyam

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

wAuner avatar Nov 26 '18 15:11 wAuner

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

daiyam avatar Nov 26 '18 15:11 daiyam