Skip to content

BUG: Clipper inserts empty lines #685

@Z2Flow

Description

@Z2Flow

macOS 15.7.3
Firefox 148.0b11
Brave 1.86.148 Web
Clipper 0.12.0
Obsidian 1.11.7

Clipper inserts a newline between lines of code in a code block.
Problem URL: https://danielabaron.me/blog/roll-your-own-search-service-for-gatsby-part2
Working URL: https://webcrunch.com/posts/lets-build-with-ruby-on-rails-blog-with-comments
Bug description:
"The Obsidian Web Clipper inserts double newlines (\n\n) between each line of code when clipping code blocks from certain websites. This appears to be related to how specific sites structure their code block HTML."

Steps to reproduce:

Navigate to the danielabaron.me article (problem URL above)
Clip the article to Obsidian
Open the clipped note in source/edit mode
Observe that code blocks have \n\n between each line instead of single \n

Expected behavior:
Code blocks should preserve original formatting with single newlines between lines (as happens with the webcrunch.com article)
Actual behavior:
Extra blank lines appear between every line of code in clipped code blocks
Environment:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions