Skip to content

Commit

Permalink
* Reorder for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
audreyt committed Nov 5, 2020
1 parent a74abc5 commit fd4a358
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions view.ls
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,12 @@ function convert-pinyin-t (yin, isBody=true)
poj = (yin.replace(/(o)([^.!?,\w\s\u2011]*)o/ig, '$1$2\u0358')
.replace(/ts/g, 'ch')
.replace(/Ts/g, 'Ch')
.replace(/u([^‑-\w\s]*)a/g, 'o$1a')
.replace(/u([^‑-\w\s]*)e/g, 'o$1e')
.replace(/i([^‑-\w\s]*)k($|[‑-\s])/g, 'e$1k$2')
.replace(/i([^‑-\w\s]*)ng/g, 'e$1ng')
.replace(/nn($|[‑-\s])/g, 'ⁿ$1')
.replace(/nnh($|[‑-\s])/g, 'hⁿ$1')
.replace(/u([^-‑\w\s]*)a/g, 'o$1a')
.replace(/u([^-‑\w\s]*)e/g, 'o$1e')
.replace(/i([^-‑\w\s]*)k($|[-‑\s])/g, 'e$1k$2')
.replace(/i([^-‑\w\s]*)ng/g, 'e$1ng')
.replace(/nn($|[-‑\s])/g, 'ⁿ$1')
.replace(/nnh($|[-‑\s])/g, 'hⁿ$1')
.replace(/([ie])r/g, '$1\u0358')
.replace(/\u030B/g, "\u0306") # 9th tone
)
Expand Down

0 comments on commit fd4a358

Please sign in to comment.