fletcher / MultiMarkdown-4

This project is now deprecated. Please use MultiMarkdown-6 instead!
https://github.com/fletcher/MultiMarkdown-5
Other
307 stars 59 forks source link

Transclusion doesn't strip BOM #92

Closed mn4367 closed 9 years ago

mn4367 commented 9 years ago
multimarkdown.exe --version
MultiMarkdown version 4.6 ...

transclusion.md:

Author: Me
Date: Today
Title: Test

{{with-utf-8-bom.md}}
multimarkdown.exe -f -t html -o transclusion.html transclusion.md

transclusion.html:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="author" content="Me"/>
    <meta name="date" content="Today"/>
    <title>Test</title>
</head>
<body>

<p>
This file has a UTF-8 BOM.</p>

</body>
</html>

with-utf-8-bom.md has a UTF-8 BOM at the beginning of the file.

I'm not sure if this is really an issue, the rendering in current browsers isn't affected (they won't 'display' these characters, but they are in the DOM) but I think transclusion should remove a UTF-8 BOM. I have to admit that I haven't tested the result with other output formats like TeX or ODT.

This happens, of course, only with transcluded files which have no metadata.

fletcher commented 9 years ago

Just pushed a fix for this. Thanks!