Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
text.py24 linesDownload Raw Back to rules_inline
1# Skip text characters for text token, place those to pending buffer2# and increment current pos3from .state_inline import StateInline4 5# Rule to skip pure text6 7 8def text(state: StateInline, silent: bool) -> bool:9    pos = state.pos10    posMax = state.posMax11 12    terminator_char = state.md.inline.terminator_re.search(state.src, pos)13    pos = terminator_char.start() if terminator_char else posMax14 15    if pos == state.pos:16        return False17 18    if not silent:19        state.pending += state.src[state.pos : pos]20 21    state.pos = pos22 23    return True24 
codekingpro/portable-devtools · Team Ai