wikitextparser/_wikitext.py
def _ext_link_shadow(self):
        """Replace the invalid chars of SPAN_PARSER_TYPES with b'_'.

        For comments, all characters are replaced, but for ('Template',
        'ParserFunction', 'Parameter') only invalid characters are replaced.
        """
        ss, se = self._span
        string = self._lststr[0][ss:se]
        byte_array = bytearray(string, 'ascii', 'replace')
        subspans = self._subspans
        for type_ in 'Template', 'ParserFunction', 'Parameter':
            for s, e in subspans(type_):
                byte_array[s:e] = b'  ' + INVALID_EXT_CHARS_SUB(
                    b' ', byte_array[s + 2:e - 2]) + b'  '
        for s, e in subspans('Comment'):
            byte_array[s:e] = (e - s) * b'_'
        return byte_array
def _ext_link_shadow(self):
        ss, se = self._span
        string = self._lststr[0][ss:se]
        byte_array = bytearray(string, 'ascii', 'replace')
        subspans = self._subspans
        for type_ in 'Template', 'ParserFunction', 'Parameter':
            for s, e in subspans(type_):
                byte_array[s:e] = b'  ' + INVALID_EXT_CHARS_SUB(
                    b' ', byte_array[s + 2:e - 2]) + b'  '
        for s, e in subspans('Comment'):
            byte_array[s:e] = (e - s) * b'_'
        return byte_array
def _ext_link_shadow ( self ) : ss , se = self . _span string = self . _lststr [ 0 ] [ ss : se ] byte_array = bytearray ( string , 'ascii' , 'replace' ) subspans = self . _subspans for type_ in 'Template' , 'ParserFunction' , 'Parameter' : for s , e in subspans ( type_ ) : byte_array [ s : e ] = b'  ' + INVALID_EXT_CHARS_SUB ( b' ' , byte_array [ s + 2 : e - 2 ] ) + b'  ' for s , e in subspans ( 'Comment' ) : byte_array [ s : e ] = ( e - s ) * b'_' return byte_array
Replace the invalid chars of SPAN_PARSER_TYPES with b'_'.

        For comments, all characters are replaced, but for ('Template',
        'ParserFunction', 'Parameter') only invalid characters are replaced.
Replace the invalid chars of SPAN_PARSER_TYPES with b _ .