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" ;
12import type { JSDOM } from "jsdom" ;
23import formatXml from "xml-formatter" ;
34
45export function formatIdeaXml ( dom : JSDOM ) : string {
56 return formatXml ( dom . serialize ( ) , {
67 collapseContent : true ,
8+ lineSeparator : EOL ,
79 indentation : " " ,
810 stripComments : true ,
911 whiteSpaceAtEndOfSelfclosingTag : true
Original file line number Diff line number Diff line change 11import { promises as fs } from "fs" ;
22import { fileURLToPath } from "url" ;
3+ import { EOL } from "os" ;
34import { filterFn , mapFn } from "@softwareventures/array" ;
45import { JSDOM } from "jsdom" ;
56import formatXml from "xml-formatter" ;
@@ -39,6 +40,7 @@ export async function writeIdeaDictionary(fsStage: FsStage): Promise<InsertResul
3940 . then ( ( ) =>
4041 formatXml ( dom . serialize ( ) , {
4142 collapseContent : true ,
43+ lineSeparator : EOL ,
4244 indentation : " " ,
4345 stripComments : true ,
4446 whiteSpaceAtEndOfSelfclosingTag : true
@@ -48,4 +50,4 @@ export async function writeIdeaDictionary(fsStage: FsStage): Promise<InsertResul
4850 const file = xmlText . then ( xmlText => textFile ( xmlText ) ) ;
4951
5052 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