Skip to content

Commit

Permalink
Kids these days and their gosh darn unicodes...
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanR712 committed Apr 15, 2024
1 parent 212f03b commit a894438
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 41 deletions.
11 changes: 0 additions & 11 deletions src/AEG/AEGTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,6 @@ export class AEGTree {
return this.sheet.isEqualTo(otherTree.sheet);
}

/**
* Returns a formatted string for downloaded proof files.
* This format was introduced for proof files having their auto-generated names displayed on
* applications like Discord.
*
* @returns Formatted string for downloaded proof files.
*/
public toDownloadString(): string {
return this.internalSheet.toDownloadString();
}

/**
* Returns a string representation of this AEGTree.
*
Expand Down
26 changes: 0 additions & 26 deletions src/AEG/CutNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,32 +412,6 @@ export class CutNode {
return formulaString;
}

/**
* Creates and returns a formatted string for this CutNode and its children.
* As opposed to the above format, this auto-generated format
* can be displayed on applications like Discord.
*
* @returns Friendlier auto-generated string format.
*/
public toDownloadString(): string {
let downloadString = "";

for (const child of this.internalChildren) {
if (child instanceof AtomNode) {
downloadString += child.identifier;
} else if (child instanceof CutNode) {
downloadString += child.toDownloadString();
}
downloadString += " ";
}
downloadString = downloadString.slice(0, -1);

if (downloadString === "") {
downloadString += "NO_ASSUMPTIONS";
}
return downloadString;
}

/**
* Creates and returns a string representation of this CutNode.
* @returns Children and boundary of this CutNode in string form.
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ async function saveMode(): Promise<void> {
data = TreeContext.tree;
} else {
if (TreeContext.proof.length === 1) {
name = "Empty Proof";
name = "One-Step Proof";
} else {
name =
TreeContext.proof[0].tree.toDownloadString() +
"___YIELDS___" +
TreeContext.getLastProofStep().tree.toDownloadString();
TreeContext.proof[0].tree.toString() +
" PROVES " +
TreeContext.getLastProofStep().tree.toString();
}
data = TreeContext.proof;
}
Expand Down

0 comments on commit a894438

Please sign in to comment.