LMCoreEX // Fix the method of detecting leading sharp.
This commit is contained in:
parent
450eec2156
commit
be0142a481
|
@ -88,9 +88,9 @@ extension vChewing {
|
||||||
strData = try String(contentsOfFile: path, encoding: .utf8).replacingOccurrences(of: "\t", with: " ")
|
strData = try String(contentsOfFile: path, encoding: .utf8).replacingOccurrences(of: "\t", with: " ")
|
||||||
strData.ranges(splitBy: "\n").forEach {
|
strData.ranges(splitBy: "\n").forEach {
|
||||||
let neta = strData[$0].split(separator: " ")
|
let neta = strData[$0].split(separator: " ")
|
||||||
if neta.count >= 2 {
|
if neta.count >= 2, String(neta[0]).first != "#" {
|
||||||
let theKey = shouldReverse ? String(neta[1]) : String(neta[0])
|
if !neta[0].isEmpty, !neta[1].isEmpty {
|
||||||
if !neta[0].isEmpty, !neta[1].isEmpty, theKey.first != "#" {
|
let theKey = shouldReverse ? String(neta[1]) : String(neta[0])
|
||||||
let theValue = $0
|
let theValue = $0
|
||||||
rangeMap[theKey, default: []].append(theValue)
|
rangeMap[theKey, default: []].append(theValue)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue