MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / Textile

Class Textile

commitizen/changelog_formats/textile.py:12–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11
12class Textile(BaseFormat):
13 extension = "textile"
14
15 RE_TITLE = re.compile(r"^h(?P<level>\d)\. (?P<title>.*)$")
16
17 def parse_version_from_title(self, line: str) -> VersionTag | None:
18 if not self.RE_TITLE.match(line):
19 return None
20 return self.tag_rules.search_version(line)
21
22 def parse_title_level(self, line: str) -> int | None:
23 m = self.RE_TITLE.match(line)
24 if not m:
25 return None
26 return int(m.group("level"))

Callers 2

formatFunction · 0.90
format_with_tagsFunction · 0.90

Calls

no outgoing calls

Tested by 2

formatFunction · 0.72
format_with_tagsFunction · 0.72