Skip to content

Commit 951b820

Browse files
renweidregad
authored andcommitted
Cgit: filter out decoration tag from commit message
Fixes #185
1 parent fff9f9f commit 951b820

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SourceCgit/SourceCgit.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,11 @@ public function commit_parents( $p_input ) {
286286
* @return string
287287
*/
288288
public function commit_message( $p_input ) {
289-
preg_match( "#<div class='commit-subject'>(.*?)(<a class=|</div>)#", $p_input, $t_matches);
289+
preg_match(
290+
"#<div class='commit-subject'>(.*?)(<span class='decoration'>|<a class=|</div>)#",
291+
$p_input,
292+
$t_matches
293+
);
290294
$t_message = trim( str_replace( '<br/>', PHP_EOL, $t_matches[1] ) );
291295

292296
# Strip ref links and signoff spans from commit message

0 commit comments

Comments
 (0)