浏览代码

better xml output formating

Martin Kunz 1 年之前
父节点
当前提交
47a274de55
共有 2 个文件被更改,包括 2 次插入5 次删除
  1. 0 3
      src/components/TheModels.vue
  2. 2 2
      src/util/XmlElem.ts

+ 0 - 3
src/components/TheModels.vue

@@ -7,9 +7,6 @@ import { ref } from 'vue';
 import VDialog from './VDialog.vue'
 import JSZip from "jszip";
 import YAML from 'yaml'
-import { stringify } from 'querystring';
-
-
 
 const store = useStore()
 const newDialogOpen = ref(false);

+ 2 - 2
src/util/XmlElem.ts

@@ -46,8 +46,8 @@ export class XMLElem {
             s+=this.escapeXml(this.value);
         }
         if(this.elements.length>0)
-            s+=" ".repeat(level);
-        s+=`</${this.name}>\n`
+            s+="\n" + " ".repeat(level);
+        s+=`</${this.name}>`
         return s;
     }