asciidoctor / atom-asciidoc-preview

⚛ AsciiDoc preview for the Atom editor.
https://atom.io/packages/asciidoc-preview
MIT License
141 stars 42 forks source link

Missing images in asciidoc preview for files saved as UTF-8 with BOM #255

Open rterekhov opened 7 years ago

rterekhov commented 7 years ago

Description

Asciidoc preview does not show images for files saved as UTF-8 with BOM.

mojavelinux commented 6 years ago

The export function only creates the HTML. You'll have to copy the images to the target folder so that they can be referenced.

It seems like a reasonable request to enhance the export functionality so images get exported to. This would either mean copying the images to the destination (a sort of "web page complete" feature) or to enable the data-uri attribute so that the images get embedded into the document.

rterekhov commented 5 years ago

The issue is about support for filen in 'UTF-8 with BOM' encoding in preview (not export). Preview works as expected for 'UTF-8 without BOM' files, but fails to render images for files saved with 'UTF-8 with BOM' encoding.

rterekhov commented 5 years ago

Tested a bit more, and find out that it is not about images at all. The problem is that the first line of adoc document is not rendered properly because of BOM.