Skip to content

Markdown: cannot put bold words inside italic sentence #8790

@lefth

Description

@lefth

Search first

  • I searched and no similar issues were found

What Happened?

I bolded some words in an an italic sentence. Some of the asterisks were rendered visibly and the bold did not take effect.

Reproduce the Bug

  1. Open any note
  2. Type a sentence:
    Park the car in the Harvard yard
  3. On PC: select the sentence and press ctrl+I to make it italic
  4. Select "yard" and press ctrl+b to make it bold
  5. Optional: also try bolding other words

Expected Behavior

Step 4 gives:

*Park the car in the Harvard **yard***

It is rendered as:

<i>Park the car in the Harvard yard**</i>

If you bold more words, you may have the text:

*Park the **car** in the **Harvard** **yard***

However it is rendered as:

<i>Park the car*</i> in the <b>Harvard yard*</b>

This is obviously wrong, and it seems to indicate that Logseq is not using a totally capable Markdown parsing library -- or maybe there is an alternative way to write this, and the text formatter is not creating appropriate Markdown?

Screenshots

The actual text, then how it is rendered on the next line:

text versus rendering

Desktop or Mobile Platform Information

Windows 11, Desktop App v0.8.18

Additional Context

The only workaround I could find is to use a quote or block quote instead of italic.

Are you willing to submit a PR? If you know how to fix the bug.

  • I'm willing to submit a PR (Thank you!)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions