Bug 485315 - Incorrect preview when inserting hard line breaks in paragraph with math
Summary: Incorrect preview when inserting hard line breaks in paragraph with math
Status: REPORTED
Alias: None
Product: ghostwriter
Classification: Applications
Component: general (show other bugs)
Version: 24.02.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: megan.conkle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-10 09:09 UTC by Vursc
Modified: 2024-04-10 09:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vursc 2024-04-10 09:09:07 UTC
SUMMARY

Preview becomes incorrect when multiple hard line breaks are inserted in paragraph that contains math when using pandoc.

STEPS TO REPRODUCE
1. Launch ghostwriter and create new file with Ctrl+N.
2. Enter "Settings > Preview Options" and change "Markdown Flavor" to any of "Pandoc CommonMark", "Pandoc GitHub-flavored Markdown", "Pandoc PHP Markdown Extra" or "Pandoc Strict". Note that "Pandoc" and "Pandoc MultiMarkdown" do not exhibit this bug.
3. Enter "a$x$b$y$c", without the quotation marks.
4. Move cursor to just before "b", press Shift+Enter.
5. Move cursor to just after "b", press Shift+Enter.

OBSERVED RESULT

Preview contains three lines:
(1) "a" followed by math "x",
(2) "b" followed by math "y" followed by "c",
(3) math "y" followed by "c".

EXPECTED RESULT

Preview contains three lines:
(1) "a" followed by math "x",
(2) "b",
(3) math "y" followed by "c".

SOFTWARE/OS VERSIONS

Arch Linux with Linux kernel version 6.8.2-arch2-1, release "#1 SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:35 +0000".

ghostwriter version is 24.02.1-1.
qt5-base version is "5.15.13+kde+r142-1".

ADDITIONAL INFORMATION

The following are only tested with "Pandoc CommonMark":
(1) Inserting the line breaks in reverse order also triggers the bug.
(2) The procedure also triggers the bug for input lines "a$x$byc", "axb$y$c" and "a$$x$$b$$y$$c".
Comment 1 Vursc 2024-04-10 09:10:55 UTC
Forgot to include the output of ghostwriter...

Using pandoc version 3.1.8
Command "multimarkdown" is not available.
Using cmark version 0.31.0
kf.sonnet.core: No language dictionaries for the language: "en_US"
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()