Pasting formatted text gives double line breaks / double new line

Steps to reproduce

  1. Create a bullet list of items in Google Docs
    image

  2. Copy the bullet list of items

  3. Paste the bullet list of items into Obsidian

  4. Bullet lists have extra line breaks
    image

Did you follow the troubleshooting guide? [Y/N]

Yes

Expected result

image

Actual result

image

Environment

SYSTEM INFO:
Obsidian version: v1.4.16
Installer version: v1.4.13
Operating system: Windows 10 Pro 10.0.22621
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

This is essentially the same bug as reported here:

Obviously, you can paste without formatting and convert the text to a list, but I was going to copy in a document that has many lists and sublists split by multiple headings, so it was going to be troublesome to reformat them all.
In the meantime, I’ll find a regex find and replace and remove the extra linebreak.

Keep up the good work.

1 Like

Are the extra new lines present in the html on the clipboard? This was the problem in the other cases. If they are, we won’t remove them.

A search for Google Docs to Markdown yielded this Docs to Markdown add-on. Looks like it could make things easier for you.

I believe that double lines happens in Docs 2 Markdown as well.

What worked for me was to copy the markdown to a text editor (I used Kate but any will do) and use Find & Replace (w/ RegEx enabled) to remove double lines:

Find: \n\n
Replace: \n

On a related noted, Docs to Markdown has been hit or miss for me, especially for files w/ a lot of images.

I had a file w/ +700 photos in it and so instead of manually pasting each image, I decided to export as .html and then import that into Obsidian which did the trick.

I still had to trim the double spacing fyi, but I was able to rename the file and bulk move all of the pics to my image folder in Obsidian.

1 Like

I have same problem and in the clipboard there is no double line breaks

The easier way I’ve found to deal with this is to use Shift Cmd V. This doesn’t give me the double line shift issue, which I’m gyesding could be related to different line ending issues.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.