File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { EOL } from "os" ;
1
2
import type { JSDOM } from "jsdom" ;
2
3
import formatXml from "xml-formatter" ;
3
4
4
5
export function formatIdeaXml ( dom : JSDOM ) : string {
5
6
return formatXml ( dom . serialize ( ) , {
6
7
collapseContent : true ,
8
+ lineSeparator : EOL ,
7
9
indentation : " " ,
8
10
stripComments : true ,
9
11
whiteSpaceAtEndOfSelfclosingTag : true
Original file line number Diff line number Diff line change 1
1
import { promises as fs } from "fs" ;
2
2
import { fileURLToPath } from "url" ;
3
+ import { EOL } from "os" ;
3
4
import { filterFn , mapFn } from "@softwareventures/array" ;
4
5
import { JSDOM } from "jsdom" ;
5
6
import formatXml from "xml-formatter" ;
@@ -39,6 +40,7 @@ export async function writeIdeaDictionary(fsStage: FsStage): Promise<InsertResul
39
40
. then ( ( ) =>
40
41
formatXml ( dom . serialize ( ) , {
41
42
collapseContent : true ,
43
+ lineSeparator : EOL ,
42
44
indentation : " " ,
43
45
stripComments : true ,
44
46
whiteSpaceAtEndOfSelfclosingTag : true
@@ -48,4 +50,4 @@ export async function writeIdeaDictionary(fsStage: FsStage): Promise<InsertResul
48
50
const file = xmlText . then ( xmlText => textFile ( xmlText ) ) ;
49
51
50
52
return file . then ( file => insert ( fsStage , `.idea/dictionaries/project.xml` , file ) ) ;
51
- }
53
+ }
You can’t perform that action at this time.
0 commit comments