Skip to content

Commit

Permalink
refactor: Delete unused functions fileReadArray and makeHtmlForRuby (#…
Browse files Browse the repository at this point in the history
…1613)

This pull request removes 2 unused functions in the data.ts file: `fileReadArray` and `makeHtmlForRuby`.

Feel free to close this pull request if we're planning on using these functions in the future.

If you use code search, you can see they're unused - so they can be safely removed:
- https://github.com/search?q=repo%3Amelink14%2Frikaikun%20fileReadArray&type=code
- https://github.com/search?q=repo%3Amelink14%2Frikaikun+makeHtmlForRuby&type=code
  • Loading branch information
bryanjenningz authored Jun 12, 2023
1 parent 114a3aa commit deeaf9e
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions extension/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,6 @@ class RcxDict {
return req.responseText;
}

fileReadArray(name: string) {
const a = this.fileRead(name).split('\n');
// Is this just in case there is blank shit in the file. It was written
// by Jon though.
// I suppose this is more robust
while (a.length > 0 && a[a.length - 1].length === 0) {
a.pop();
}
return a;
}

loadNames() {
if (this.nameDict && this.nameIndex) {
return;
Expand Down Expand Up @@ -950,39 +939,6 @@ class RcxDict {
return b.join('');
}

makeHtmlForRuby(entry: DictEntryData | null) {
let e;
let s;
let t;
let i;

if (entry === null) {
return '';
}

const b = [];

s = t = '';

if (entry.title) {
b.push('<div class="w-title">' + entry.title + '</div>');
}

for (i = 0; i < entry.data.length; ++i) {
e = entry.data[i].entry.match(/^(.+?)\s+(?:\[(.*?)\])?\s*\/(.+)\//);
if (!e) {
continue;
}

s = e[3];
t = s.replace(/\//g, '; ');
t = '<span class="w-def">' + t + '</span><br/>\n';
}
b.push(t);

return b.join('');
}

makeText(entry: DictEntryData | null, max: number): string {
let e;
let i;
Expand Down

0 comments on commit deeaf9e

Please sign in to comment.