Markdown preview and result differ

Hi @roke_julian_lockhart

I can repro it and the preview indeed differs from the post. :slight_smile:

The empty line below or above your tags plays a little role here but it’s not important. If you remove them, it will wrap the closest next and previous content, but not the whole content.

no empty lines Additionally, how come
import QtQuick
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts
import QtPositioning

and prepension of QQC2 before Action, Button, ApplicationWindow, and Frame doesn’t work, whereas

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtPositioning
import QtQuick.Controls 2.15 as QQC2

and addition of QQC2.Button (per [qml+pyqt6] Can't get native control appearance - #2 by carl - Help - KDE Discuss) does?
A new line


That said…
I thought the issue was because <strike>[1] was an inline element. I can repro it with other tags such as <b> or <i>, but not <strong>, <em>. So it’s not because it’s an inline-level element. Discourse allows wrapping blocks with inlines, from what I can see with <strong> or <em>.

<strong>
<strong>

Additionally, how come

```qml
import QtQuick
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts
import QtPositioning
```

and prepension of `QQC2` before `Action`, `Button`, `ApplicationWindow`, and `Frame` doesn't work, whereas

```qml
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtPositioning
import QtQuick.Controls 2.15 as QQC2
```

and addition of `QQC2.Button` (per https://discuss.kde.org/t/qml-pyqt6-cant-get-native-control-appearance/1240/2?u=rokejulianlockhart) does?
A new line

</strong>

It seems not to be related to authorized tags, since Discourse accepts all these tags (<strike>, <s>, <b>, <strong>, <i>, <em>…).

It seems not to be a markdown-it quirk either, since I can’t reproduce the issue in their demo.


  1. Note that <strike> is deprecated in favor of <s> . A detail that won’t change anything in this issue, but always good to know… I just learned it right now after all :smile: ↩︎

5 Likes