Live Preview: Punctuation Marks after words that are bold/highlighted or after links gets pushed to next line

This occurs in the Help Vault as well. When you’ve got Live Preview mode on, the punctuation marks (periods, commas, etc.) sometimes get pushed to the next line, if the word that is bold or highlit is at the end of the previous line.
Normally you’d expect the comma or period to be part of that previous line because there’s no space. I assume the live preview and the switching back and forth between showing the asterisks or equal signs mess with that.

Steps to reproduce

  1. have word that is “modified” through bold or italics or highlighting
  2. have that word at the end of a line, followed by a punctuation mark . or ,
  3. see that that symbol gets pushed to the next line.
  4. when you click on the word, the symbols (* or =) are shown and then the whole is usually moved to the next line.
  5. when you click out of that word, those symbols disappear, and the word moves up a line, but the punctuation mark stays on that line.

Expected result

punctuation mark should remain with the previous word in previous line

Actual result

punctuation mark is on its own in the next line

Environment

  • Operating system: Linux Mint
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.13.23
    Installer version: v0.12.15
    Operating system: #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022 5.13.0-27-generic
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: on

RECOMMENDATIONS:
none


Additional information

image

6 Likes

Steps to reproduce

  1. Write a text that’s long enough so it breaks in multiple lines.
  2. Put a comma in a word near the end of one line.
  3. Set the comma’s preceding word to italics.

Expected result

The comma should appear in the first line, or move the word (in italics) and the comma to the following line.

Actual result

The comma appears alone in a new line, like this:
image

Environment

  • Operating system: Windows 11
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.13.23
    Installer version: v0.12.15
    Operating system: Windows 10 Pro 10.0.22000
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: light
    Community theme: none
    Snippets enabled: 5
    Safe mode: off
    Plugins installed: 12
    Plugins enabled: 10
    1: Better Word Count
    2: Tidy Footnotes
    3: Footnote Shortcut
    4: Icon Folder
    5: Imgur Plugin
    6: Citations
    7: Minimal Theme Settings
    8: Emoji Toolbar
    9: Calendar
    10: Day Planner

I’ve noticed it also occurs when a bracket is followed by a math formula:

image

2 Likes

Seems to happen after code blocks too.

Steps to reproduce

Blaghaslkjdhfl kasjdhfl kajsdfhl ksjk adsdhjsfl kjshdfkl jshdf lkjsaflkjhksf  [smooth jazz cover](https://www.youtube.com/watch?v=JHjb-oN-IA8&ab_channel=036MALUKU),

Expected result

I expect the comma to stay with the link, but it is broken onto the next line, which starts with a comma.

This only happens if the link is external and it renders the box and arrow glyph after the link. Internal links are not affected.

Actual result

Screenshot:

Environment

  • Operating system:
    OS X Catalina
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.14.6
    Installer version: v0.14.6
    Operating system: Darwin Kernel Version 19.6.0: Tue Feb 15 21:39:11 PST 2022; root:xnu-6153.141.59~1/RELEASE_X86_64 19.6.0
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: off
    Plugins installed: 1
    Plugins enabled: 1
    1: Obsidian Charts

RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the help vault or disable community plugins.


Additional information

2 Likes

I haven’t tested it everywhere, but at first glance this css snippet seems to fix the issue:

.markdown-source-view.mod-cm6 img.cm-widgetBuffer  {
	display: none !important;
}

Steps to reproduce

  1. Create an external hyperlink (not tested with internal links)
  2. Put quotes around the link, like "[Obsidian](https://obsidian.md/)"
  3. Write just enough text before the link so that the link drops to the next line.

Expected result

In reading and Source view, the leading quote mark drops down to the next line. In Live Preview, it does not. This is very annoying, because it leaves me assuming I left a space between the quote mark and the opening bracket.

Actual result

The quote mark is left orphaned on the previous line, like this:

Environment

  • Operating system: iPadOS
  • Debug info:

SYSTEM INFO:
Operating system: ios 15.6.1 (Apple iPad)
Obsidian version: 1.3.1 (67)
API version: v0.15.9
Login status: not logged in
Live preview: on
Legacy editor: off
Base theme: light
Community theme: none
Snippets enabled: 1
Restricted mode: on

RECOMMENDATIONS:
Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.


Additional information

1 Like