From 10245f91469026a1a2350de7af522d56e708bb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Fri, 7 Jul 2023 15:03:23 +0200 Subject: [PATCH] Add byte-order mark to docs/*/*.md file (#27) --- docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md | 2 +- lib/README.md | 2 +- lib/build.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md b/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md index 1e60c5cb..2ae70b55 100644 --- a/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md +++ b/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md @@ -1,4 +1,4 @@ - + ![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) ------- diff --git a/lib/README.md b/lib/README.md index ef1a02cc..fc96a9e7 100644 --- a/lib/README.md +++ b/lib/README.md @@ -81,7 +81,7 @@ The [`pdf.js`](pdf.js) module uses an embedded browser ([`puppeteer`](https://gi The following scripts can be executed manually or as part of a GitHub Action: -- [`npm run build`](build.js) runs the conversion and writes the Markdown output as well as the HTML output into the [`doc/*`](../doc/odata-data-aggregation-ext) folder. +- [`npm run build`](build.js) runs the conversion and writes the Markdown output as well as the HTML output into the [`doc/*`](../doc/odata-data-aggregation-ext) folder. The Markdown file starts with a byte-order mark (`EF BB BF`) so that it is recognized as UTF-8 when loaded from github.io. - [`npm run pdf`](build-pdf.mjs) runs the PDF conversion and writes the PDF document into the [`doc/*`](../doc/odata-data-aggregation-ext) folder. - [`npm test`](../test) runs a test suite. diff --git a/lib/build.js b/lib/build.js index ccba96dd..4c2f36ec 100644 --- a/lib/build.js +++ b/lib/build.js @@ -19,6 +19,7 @@ fs.readdirSync(__dirname + "/..", { withFileTypes: true }).forEach(function ( __dirname + "/../docs/" + doc.name + "/" + doc.name + ".html" ) ); + md.write(Buffer.of(0xEF, 0xBB, 0xBF)); new Number(doc.name) .build( new PassThrough()