Skip to content

Commit

Permalink
rafactor: drop useless separator
Browse files Browse the repository at this point in the history
  • Loading branch information
imatpot committed May 12, 2024
1 parent 61fb95e commit 00d617e
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/lib/converters/xsampa.typ
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,12 @@
key: (pair) => -pair.at(0).len()
)

#let remove-separators(text) = text.replace("-", "")

#let convert-xsampa(text, reverse: false) = {
let (from, to) = if reverse { (1, 0) } else { (0, 1) }

for pair in xsampa-unicode {
text = text.replace(pair.at(from), pair.at(to))
}

if not reverse {
text = remove-separators(text)
}

return text
}

0 comments on commit 00d617e

Please sign in to comment.