MCPcopy Create free account
hub / github.com/chubin/cheat.sh / _is_block_separator

Method _is_block_separator

lib/adapter/learnxiny.py:549–561  ·  view source on GitHub ↗
(self, before, now, after)

Source from the content-addressed store, hash-verified

547 }
548
549 def _is_block_separator(self, before, now, after):
550 if (
551 re.match("//////+", before)
552 and re.match(r"//+\s+[0-9]+\.", now)
553 and re.match(r"\s*", after)
554 ):
555 block_name = re.sub(r"//+\s+[0-9]+\.\s*", "", now)
556 block_name = "_".join(block_name.strip(", ").split())
557 for k in self._replace_with:
558 if k in block_name:
559 block_name = self._replace_with[k]
560 return block_name
561 return None
562
563 @staticmethod
564 def _cut_block(block, start_block=False):

Callers

nothing calls this directly

Calls 1

stripMethod · 0.80

Tested by

no test coverage detected