original_docstring: After all detok resources are loaded, compile markup_attach_re from markup_attach_re_elements.
docstring: After all detok resources are loaded, compile markup_attach_re from markup_attach_re_elements.
docstring_tokens: After all detok resources are loaded compile markup_attach_re from markup_attach_re_elements .
code: def build_markup_attach_re(self, tok: Optional = None) -> None:
          """After all detok resources are loaded, compile markup_attach_re from markup_attach_re_elements."""
          attach_tag = self.attach_tag
          if tok:
              tok.char_type_vector_dict[attach_tag] = tok.char_type_vector_dict.get(attach_tag, 0) \
                                                      | tok.char_is_attach_tag
          self.markup_attach_re_elements.update('/')  # for robustness
          regex_string_core = attach_tag + '?(?:' + '|'.join(self.markup_attach_re_elements) + ')' + attach_tag + '?'
          self.markup_attach_re_string = '(?:' + regex_string_core + '|' + attach_tag + attach_tag + ')'
          # log.info(f"markup_attach_re: {self.markup_attach_re_string}")
          self.markup_attach_re = re.compile('^' + self.markup_attach_re_string + '$', flags=re.IGNORECASE)
          # log.info(f"markup_attach_re: {self.markup_attach_re}")
code_tokens: def build_markup_attach_re ( self , tok : Optional = None ) -> None : attach_tag = self . attach_tag if tok : tok . char_type_vector_dict [ attach_tag ] = tok . char_type_vector_dict . get ( attach_tag , 0 ) | tok . char_is_attach_tag self . markup_attach_re_elements . update ( '/' ) regex_string_core = attach_tag + '?(?:' + '|' . join ( self . markup_attach_re_elements ) + ')' + attach_tag + '?' self . markup_attach_re_string = '(?:' + regex_string_core + '|' + attach_tag + attach_tag + ')' self . markup_attach_re = re . compile ( '^' + self . markup_attach_re_string + '$' , flags = re . IGNORECASE )
short_docstring: After all detok resources are loaded, compile markup_attach_re from markup_attach_re_elements.
short_docstring_tokens: After all detok resources are loaded compile markup_attach_re from markup_attach_re_elements .
comment: """After all detok resources are loaded, compile markup_attach_re from markup_attach_re_elements."""$SEP$# for robustness$SEP$# log.info(f"markup_attach_re: {self.markup_attach_re_string}")$SEP$# log.info(f"markup_attach_re: {self.markup_attach_re}")