1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-10-30 23:43:47 +02:00

font-patcher: Fix comment

Never trust comments :-/

Obviously the code has been changed a bit, and the commend did not
reflect that.

Instead of having two different modes (the variable is gone completely)
it just automatically handles verbantim token different from
non-verbatim token (which must be regexes).

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow
2025-06-07 15:27:38 +02:00
committed by Fini
parent a9cb48e9f4
commit f01ae02100

View File

@@ -135,11 +135,12 @@ class FontnameTools:
@staticmethod
def get_name_token(name, tokens):
"""Try to find any case insensitive token from tokens in the name, return tuple with found token-list and rest"""
# The default mode (allow_regex_token = False) will try to find any verbatim string in the
# First will try to find any verbatim string in the
# tokens list (case insensitive matching) and give that tokens list item back with
# unchanged case (i.e. [ 'Bold' ] will match "bold" and return it as [ 'Bold', ]
# In the regex mode (allow_regex_token = True) it will use the tokens elements as
# Otherwise it will use the tokens elements as
# regexes and return the original (i.e. from name) case.
# (This is both done on parallel.)
#
# Token are always used in a regex and may not capture, use non capturing
# grouping if needed (?: ... )