Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
8
-
Description
In Bitbucket 5.16.2 - 6.2.3 (only versions tested) the following markdown is not rendered properly:
<!-- @import "[TOC]" {cmd="toc" depthFrom=2 depthTo=6 orderedList=false} --> `features/steps/steps.py` ```python from testplan_bdd.step_registry import Given, When, Then @Given('we have two number: {a} and {b}') def step_definition(env, result, context, a, b): context.numbers = (int(a), int(b)) @When('we sum the numbers') def step_definition(env, result, context): context.result = sum(context.numbers) @Then('the result is: {expected}') def step_definition(env, result, context, expected): result.equal(int(expected))(context.result) ```
The decorators in this python code excerpt are shifted down. @Given is changed to @import, @When becomes @Given & @Then becomes @When. Only the decorators are changed however, the rest of the line remains the same.
If you remove the line <!-- @import "[TOC]" {\cmd="toc" depthFrom=2 depthTo=6 orderedList=false} --> then the decorators all display correctly.
When you take this same excerpt to https://spec.commonmark.org/dingus/ it is rendered correctly
The <!-- @import "[TOC]" {\cmd="toc" depthFrom=2 depthTo=6 orderedList=false} --> line is added by generated by the Visual Studio Code extension: Markdown Preview Enhanced