kitschpatrol / yanki-obsidian

An Obsidian plugin for automated flashcard syncing from a folder in your vault to Anki. Pure Markdown syntax. No fuss.
MIT License
35 stars 1 forks source link

Line breaks do not follow "Strict line breaks" setting #10

Closed emisjerry closed 2 months ago

emisjerry commented 2 months ago

Hi Eric,

I've disabled "Strict line breaks" in the Obsidian Editor setting. So the following text will be rendered as three lines in Preview and Reading mode:

This is line 1.
This is line 2.
This is line 3.

But the result after syncing, these lines will be put in a <p></p>. It will be rendered as ONE line if i preview this card. image

Could you follow the line breaks settings? If turn the setting off, append a <br> at the end of each line. Maybe you'll have better idea to this issue. Thanks.

kitschpatrol commented 2 months ago

Thanks, yes for the sake of remaining as Obsidian-agnostic as possible, Yanki has its own Markdown to HTML conversion implementation, which is not (currently) aware of Markdown-related settings elsewhere in Obsidian.

Will fix, but might be a week or two until I have the time.

kitschpatrol commented 2 months ago

This should be fixed in the latest release, 1.4.2.

The application-level setting in Obsidian is automatically detected and used during syncing.

A "strict line breaks" option is also now exposed as a CLI flag in the stand-alone version yanki.