mvdkwast / obsidian-copy-as-html

Obsidian plugin: copy document as HTML, including images
MIT License
48 stars 11 forks source link

Footnotes are not handled correctly #20

Closed mvdkwast closed 1 year ago

mvdkwast commented 1 year ago
          Similiar issue are also on footnotes.

Originally posted by @karlla1220 in https://github.com/mvdkwast/obsidian-copy-as-html/issues/19#issuecomment-1410472037

mvdkwast commented 1 year ago

What would be the best way to address this ?

mvdkwast commented 1 year ago

Fixed in release 0.4.0

toddmedema commented 1 year ago

Following up here, it seems like this isn't fully resolved, or maybe reverted back to undesirable behavior?

I have this text:

Habitats[^1].

Which renders fine in the Obsidian live view, but when I use this plugin to copy-paste it into Google Docs, it comes out as just

Habitats1.

I was hoping it could at least have the 1 be superscript :) It's causing some confusion with my readers.

mvdkwast commented 1 year ago

Hi @toddmedema,

I cannot reproduce this with Obsidian 1.4.16 and this plugin version 0.6.0.

How footnotes are displayed is controlled by the footnote setting :

image

This is how it renders in Google Docs :

image

mvdkwast commented 1 year ago

Just a thought, @toddmedema, maybe you forgot the colon (:) in the foot-note ?

The following document renders as My foot-note reference1 in both reading mode and when copied, because a column is missing after [^1]

My foot-note reference[^1] 

[^1 ] my foot-note

If you can reproduce the problem, please open a new issue for it.

toddmedema commented 1 year ago

Ah, I found the issue. I needed to add a newline break before the footnotes section, e.g.

As the first snow of the season drifted down, [[Miki]] began. "Alright team, circle up. We have one week to install these five Habitats[^1].

Footnotes:

[^1]: Habitats: Modularly-assembled buildings.

Instead of

As the first snow of the season drifted down, [[Miki]] began. "Alright team, circle up. We have one week to install these five Habitats[^1].

Footnotes:
[^1]: Habitats: Modularly-assembled buildings.
toddmedema commented 1 year ago

Thanks for taking a look! :)