Skip to content

Commit 202661f

Browse files
committed
refactor: remove msd_orig outerHTML
Was introduced in 6dea356 but seems pointless now
1 parent c2b6b8a commit 202661f

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

app/scripts/jq_extensions.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { loc } from "@/i18n"
22

3-
$.fn.outerHTML = function () {
4-
return $(this).clone().wrap("<div></div>").parent().html()
5-
}
6-
73
$.fn.localeKey = function (key) {
84
this.each(function () {
95
$(this).attr("rel", `localize[${key}]`).html(loc(key))

app/scripts/jquery.types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ export type JQueryExtended<T = HTMLElement> = JQuery<T> & {
22
// Defined in /app/lib/jquery.localize.js, a modified version of jquery-localize
33
localize: () => JQueryExtended<T>
44
// Defined in jq_extensions
5-
outerHTML: () => JQueryExtended<T>
65
localeKey: (key: string) => JQueryExtended<T>
76
}
87

app/scripts/statistics/statistics.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,6 @@ function reduceStringify(name: string, cl?: CorpusSet): (values: string[]) => st
142142
else if (name == "saldo" || name == "sense") transforms.push((token) => Saldo.parse(token)?.toHtml() || token)
143143
else if (name == "lemma") transforms.push((lemma) => lemma.replace(/_/g, " ").replace(/:\d+$/g, ""))
144144

145-
// TODO This is specific to ASU corpus, move out to config
146-
if (name == "msd_orig") transforms.push((token) => ($("<span>").text(token) as any).outerHTML())
147-
148145
const transform = (value: string) => transforms.reduce((acc, f) => f(acc), value)
149146
// Join with spaces and then squash redundant and surrounding space.
150147
return (values) => values.map(transform).join(" ").trim().replace(/\s+/g, " ")

0 commit comments

Comments
 (0)