Page MenuHomePhabricator

CR should parse 'bug#25848'
Closed, ResolvedPublic

Description

We might want to parse and render the syntax 'bug#xxxx'

Example usage: r82784


Version: unspecified
Severity: enhancement

Details

Reference
bz27703

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:34 PM
bzimport set Reference to bz27703.
bzimport added a subscriber: Unknown Object (MLST).
		$text = preg_replace_callback( '/\bbug #?(\d+)\b/i',
			array( $this, 'messageBugLink' ), $text );

That apparently works in code comments ^

		if ( preg_match( '/\b(bug #?(\d+)|\$[we]g[0-9a-z]{3,50})\b/i', $summary ) ) {
			return true;
		}

For Code Release Notes ^

		if ( preg_match_all( '/\bbug (\d+)\b/', $this->message, $m ) ) {

^ Comments

r82786 adds one for comments. Not sure if it's used anywhere else

  • if ( preg_match_all( '/\bbug (\d+)\b/', $this->message, $m ) ) {

+ if ( preg_match_all( '/\bbug #?(\d+)\b/', $this->message, $m ) ) {

So we also need to make the space optional too...

AFAIK, the bug #1234 already worked?

Yeah, look at r82696, that does bug#1234

I'll make the spaces option in a few