fix Emojipadia.json

This commit is contained in:
tateisu 2021-02-23 15:49:02 +09:00
parent a6c677a5c6
commit 8298a6f49c
2 changed files with 1782 additions and 1777 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
@file:Suppress("MemberVisibilityCanBePrivate")
package jp.juggler.subwaytooter.emoji
import java.io.*
@ -278,6 +279,7 @@ class JsonObject : LinkedHashMap<String, Any?>() {
fun optDouble(name: String, defVal: Double = 0.0) = double(name) ?: defVal
fun stringOrThrow(name: String) = notEmptyOrThrow(name, string(name))
// fun isNull(name : String) = this[name] == null
fun putNotNull(name: String, value: Any?) {
if (value != null) put(name, value)
@ -840,6 +842,9 @@ private fun Writer.writeQuote(string : String) : Writer {
append(c)
}
// don't escape some characters those used in many emoji
'\u200d', '\u20e3', '\u203c', '\u2049' -> append(c)
'/' -> {
if (previousChar == '<') append('\\')
append(c)