farling42 / obsidian-import-json

Plug-in for Obsidian.md which will create Notes from JSON files
MIT License
85 stars 5 forks source link

Importing JSON with apostrophes in obsidian #53

Closed Myliak closed 11 months ago

Myliak commented 11 months ago

Hello,

I am trying to import beast from 5e.tools json. The description of one of the abilities has apostrophes and when imported into obsidian, apostrophes are replaced with ' which is unicode representation of '. Json in question is below

{
    "name": "Regeneration",
    "description": "The troll regains 10 hit points at the start of its turn. If the troll takes acid or fire damage, this trait doesn't function at the start of the troll's next turn. The troll dies only if it starts its turn with 0 hit points and doesn't regenerate."
}

And this is the imported text in Obsidian:

Regeneration: The troll regains 10 hit points at the start of its turn. If the troll takes acid or fire damage, this trait doesn't function at the start of the troll's next turn. The troll dies only if it starts its turn with 0 hit points and doesn't regenerate.

Is there any way to bypass this behavior? I was trying to reproduce it with javascript, but I think it's problem with communication between obsidian and plugin.

Thank you for any replies.

farling42 commented 11 months ago

I can't see a difference in your report.

Is it all three occurrences of the apostrophe which are being replaced?

Myliak commented 11 months ago

Github formatted it automatically, didn't notice, sorry :D

Regeneration The troll regains 10 hit points at the start of its turn. If the troll takes acid or fire damage, this trait doesn't function at the start of the troll's next turn. The troll dies only if it starts its turn with 0 hit points and doesn't regenerate.

farling42 commented 11 months ago

Oh, the HTML form of the character. (Unicode world be changing it's binary value to something like 2019)

farling42 commented 11 months ago

This issue should be fixed in version 0.31.2