Skip to content

Commit

Permalink
Add line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolson committed Jun 8, 2022
1 parent def97db commit d734763
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plist-file-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class PlutilParser implements Parser {
toXml(uri: string): string {
return String(spawnSync('plutil', ['-convert', 'xml1', uri, '-o', '-']).stdout);
}

async toBinary(uri: string, xmlString: string): Promise<void> {
const output = spawnSync('plutil', ['-convert', 'binary1', '-o', uri, '-'], { input: xmlString });
if (String(output.stdout).length) {
Expand All @@ -38,6 +39,7 @@ print(plistlib.dumps(pl).decode('utf-8'))
}
return String(output.stdout);
}

async toBinary(uri: string, xmlString: string): Promise<void> {
const python = `
import sys, os, tempfile, shutil, plistlib
Expand All @@ -56,10 +58,12 @@ os.remove(path)
}
}
}

class NodeParser implements Parser {
toXml(uri: string): string {
return plist.stringify(plist.readFileSync(uri));
}

async toBinary(uri: string, xmlString: string): Promise<void> {
const result = await vscode.window.showQuickPick(['Continue', 'Cancel'], {
placeHolder: 'Values of type real that are whole numbers will be saved as type integer. Continue?'
Expand Down

0 comments on commit d734763

Please sign in to comment.