Skip to main content

parse_subject

Function parse_subject 

Source
pub fn parse_subject(subject_line: &str) -> Option<Subject>
Expand description

^\s*(emoji)?\s*(type)(\(scope\))?(!)?:\s*(.*)$ over the FIRST line only.

First line only is load-bearing: the JS once used /ms flags, so ^ matched any line start and a body quoting a conventional commit (a revert citing the commit it undid) was picked up as the subject and rewritten into it.