From d27e42dec6b6255246bd488e12ea2662018f12ab Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 23 Feb 2023 00:50:45 +0100 Subject: Hotfix redundant null terminator inserted by emoji completer --- scripts/emoji_codegen.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/emoji_codegen.py b/scripts/emoji_codegen.py index 2de09fdb..53c3d2e8 100755 --- a/scripts/emoji_codegen.py +++ b/scripts/emoji_codegen.py @@ -19,7 +19,7 @@ constexpr const std::array emoji::Provider::emoji = { {%- for c in kwargs.items() %} // {{ c[0].capitalize() }} {%- for e in c[1] %} - Emoji{null_literal(u"{{ e.code }}"), null_literal(u"{{ e.shortname }}"), null_literal(u"{{ e.unicodename }}"), emoji::Emoji::Category::{{ c[0].capitalize() }}}, + Emoji{std::u16string_view(u"{{ e.code }}"), std::u16string_view(u"{{ e.shortname }}"), std::u16string_view(u"{{ e.unicodename }}"), emoji::Emoji::Category::{{ c[0].capitalize() }}}, {%- endfor %} {%- endfor %} }; @@ -55,9 +55,9 @@ if __name__ == '__main__': 'Flags': flags, 'Component': symbols } - shortcodeDict = {} + shortcodeDict = {} # for my sanity - this strips newlines - for line in open(shortcodefilename, 'r', encoding="utf8"): + for line in open(shortcodefilename, 'r', encoding="utf8"): longname, shortname = line.strip().split(':') shortcodeDict[longname] = shortname current_category = '' -- cgit 1.5.1