KirbyText Line Spacing Format Issue

When I’m in the panel and have a bold formatted header such as **Title Two** if I do not have an empty line above that line Kirbytext will not format it and just output **Title Two** with the stars.

In Kirby 2 this worked fine, just noticed that several of my pages have this issue after the conversion.

Update: After digging a little bit it seems to happen if there is html tags above the markdown. For example:

<script src="https://xxxxxxxxxxxxxx.com/assets/integration/v1/sdk.js"  type="text/javascript"></script>
###Improved Fraud Alerts

Yields ###Improved Fraud Alerts on the page, but if I give it a space between the two it works fine.

It also seems to happen if there is a file just above the text.

(image: shutterstock_1424238572.jpg)
**Test**

Could you please post an example? I can’t reproduce this, but maybe I’m missing something.

Also, are you using the standard textarea or another via plugin? And which Kirby version?

Updated above with examples, I’ve already fixed it on my site, but wanted to point out that it was something that broke from 2 to 3.

Standard Kirby 3.2.0

Ok, with those examples I can reproduce the issue. Don’t know if that’s a bug or not, I always insert new lines to start a new paragraph, especially after tags etc. but also in general to make text more readable, so I wouldn’t even know if that worked in Kirby 2 or not.

Feel free to create an issue on GitHub.

Does it persist if you update to the current release? Im guessing yes but worth a shot.

Yes, I’m currently testing with 3.2.2, so updating won’t help.

Not much I can say about this behavior in Kirby but as far as I know, this is implementation-dependent of the Markdown parser. This discussion happens with other software too and in some editors there’s a checkbox to require a new line; I don’t remember anymore what the official standard says but most likely this is not Kirby specific.

I’ll update now.

Sure but wasn’t a bug fixed recently around white space in snippets used in the textfield, the spacing incorrectly trigging pre tags? Perhaps this is related. I was hoping the latest minor release might help.

I meant 3.2.2, sorry.

It persists. I know I didn’t have the issue in Kirby 2 because I didn’t change my content when I converted over to Kirby 3. Only after reviewing a few pages after the upgrade did I see it.

From what I can see, it doesn’t happen with simple paragraphs like this:

Lorem ipsum etc.
**New Title**
Lorem lorem boring boring

but only after HTML tags/KIrbytags. Question is if this is due to issues with the Markdown parser or Kirbytext.

Github issue posted - https://github.com/getkirby/getkirby.com/issues/629

I think it is a Parsedown issue:

$parsedown = new Parsedown();

$markdownWithHtml = <<<MARKDOWN
<script>let element = 'el';</script>
#Test
MARKDOWN;

$parsedown = new Parsedown();
echo $parsedown->text($markdownWithHtml);