timrogers / obsidian-share-as-gist

An Obsidian (https://obsidian.md/) plugin for sharing your notes as a GitHub gist - either privately or publicly.
MIT License
75 stars 7 forks source link

Blank lines included at the beginning of the note after private sharing #602

Closed jmbenedetto closed 3 months ago

jmbenedetto commented 3 months ago

Hello. Thanks a lot for the amazing plugin.

Action: Share a note using the option "Share as private gist on GitHub.com".

Expected result: Get the note replicated as a private gist. No change to the Obsidian note (Enable updating gists afet creation => False)

Actual result: Get the note replicated as a private gist. 3 empty lines added to Obsidian note (Enable updating gists afet creation => False)

Impact: Obsidian properties no longer rendered correctly.

This does not happen when sharing as public gist.

Screenshot 2024-07-11 at 14 39 43 Screenshot 2024-07-11 at 14 32 27 Screenshot 2024-07-11 at 14 31 51
timrogers commented 3 months ago

Thanks for flagging! I'm able to reproduce this issue. Let me try to figure it out.

timrogers commented 3 months ago

Do you see the same issue if you use the "Create gist" button in the "Set a description for your gist" box, rather than hitting the Return key?

timrogers commented 3 months ago

If I am correct about the problem, I think I have a fix in https://github.com/timrogers/obsidian-share-as-gist/pull/603 😊 It fixes the extra lines for me!