File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 33"""
44
55import re
6-
7- REGEX_CDATA_BRACKET = re .compile (r"<(?!(\/?(\!\[CDATA)))" )
8- REGEX_TAG_BRACKET = re .compile (
9- r"<(?!(\/?(b|em|i|cite|dfn|big|small|font|tt|s|strike|del|u|super|sub|ul|li|br|div|span|p|a|\!\[CDATA))\b)" )
10- REGEX_RESORCE_IDENTIFIER = re .compile (r"@(?!([a-z\.]+:)?[a-z+]+\/[a-zA-Z_]+)" ) # @[<package_name>:]<resource_type>/<resource_name>
11-
126import html
137from typing import Dict , Optional , TextIO
148from xml .etree import ElementTree as ET
2216 number_of_twine_placeholders ,
2317)
2418
19+ REGEX_CDATA_BRACKET = re .compile (r"<(?!(\/?(\!\[CDATA)))" )
20+ REGEX_TAG_BRACKET = re .compile (
21+ r"<(?!(\/?(b|em|i|cite|dfn|big|small|font|tt|s|strike|del|u|super|sub|ul|li|br|div|span|p|a|\!\[CDATA))\b)" )
22+ REGEX_RESORCE_IDENTIFIER = re .compile (r"@(?!([a-z\.]+:)?[a-z+]+\/[a-zA-Z_]+)" ) # @[<package_name>:]<resource_type>/<resource_name>
23+
2524
2625def inner_xml (node :Element ) -> str :
2726 # Get inner XML (text + nested elements)
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ def is_plural(self) -> bool:
159159 """Check if this definition has plural translations."""
160160 return bool (self .plural_translations )
161161
162- def copy_lang (self , lang : str ) -> TwineDefinition :
162+ def copy_lang (self , lang : str ) -> " TwineDefinition" :
163163 """ Copy translation for one language into new definition. """
164164 new_def = TwineDefinition (self .key )
165165 new_def ._comment = self ._comment
You can’t perform that action at this time.
0 commit comments