( This worked in the past )
Copy / Paste from Obsidian into Github Issues / Gist. The formatting doesn’t seem to transfer over anymore. It looks like a tab/space issue. Is this an issue with Obsidian or a change in the way Github interprets Copy / Paste data?
If the latter, is there something I can change in my editor to make it easier to copy/paste into Github, Gitlab, etc?
Things I have tried
I look at the settings and couldn’t find anything of note
Can you describe the problem in more detail, and perhaps post an example (in a code block using 4 backticks or tildes)? It’s not clear to me what formatting problems might be caused by a tab/space issue.
Are you copying the Markdown from Obsidian’s editing view, and that Markdown isn’t being rendered by GitHub? Or are you copying the rich text from reading view?
A way to test which end the problem is at would be to paste somewhere else.
## Header works file
- Bullet works fine
- [ ] Checkbook seems to be an issue
- [x] Checked checkbox test
- [ ] Indentation looks off too
I’m not sure if I’m using editing mode or rich text from reading view. I am using the macOS Desktop App, writing notes and than copying the notes from Obsidian into Github Gist/Issues.
After some investigation, it seems GH might have updated their software, so I don’t think Obsidian is responsible for the bug I’m now experiencing.
With that said, I’ve spent hours formatting my notes in GMail, Thunderbird, Github, GitLab, and various other mediums. It would be nice to have support for copy/paste into those applications.
When pasting to something like Gmail you’ll want to copy from reading view if you have formatting you want to keep.
GitHub uses Markdown so I’d expect you’d want to copy from editing view (either mode). The sample you posted looks fine to me when I preview it in a GitHub comment field.
It does seem like you used <4 spaces to indent, which is not enough — it should be 4 spaces or 1 tab. I didn’t see a problem with it in my test (maybe GitHub treated it leniently), but Id expect it to.
You could also try putting blank lines between things that are different from each other (heading and paragraph, bullet list and checklist, etc.). It’s not always required, but it reduces the chance of unexpected behavior.
Thank you for the direction about gmail/reader mode. I’ll apply it and report back if I continue to have an issue.
I took another look at the Github formatting issue, and it seems to be an issue with the Preview. If I create the Issue, it works just fine as you mentioned. Thank you for helping me with that.