浏览代码

Ajout header xml

Loquicom 5 年之前
父节点
当前提交
7120eefd2e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/extract/formatter.js

+ 2 - 1
src/extract/formatter.js

@@ -2,7 +2,8 @@ const Entities = require('html-entities').AllHtmlEntities;
 const entities = new Entities();
 
 module.exports.toXml = function (name, data) {
-    let xml = '<extract>\n';
+    let xml = '<?xml version="1.0" encoding="UTF-8">\n';
+    xml += '<extract>\n';
     xml += `\t<name>${entities.decode(name)}</name>\n`;
     xml += '\t<coauthors>\n';
     data.coauth.forEach(elt => {