Skip to content

Commit f45bd00

Browse files
committed
Parsing for "@see https://blahblah This contains the content"
1 parent 0fac9af commit f45bd00

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/runner.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,22 @@ function export_parse_tag( $tag_name, $value ) {
446446
}
447447
} elseif ( 'see' === $tag_name ) {
448448
// @see can have a URL or reference
449+
if ( preg_match( '#^(https?://\S+)\s*(.*)$#i', $value, $matches ) ) {
450+
$result = array(
451+
'content' => $matches[1],
452+
'refers' => $matches[2],
453+
);
454+
} elseif ( preg_match( '/^(\S+)\s*(.*)$/', $value, $matches ) ) {
455+
$result = array(
456+
'content' => $matches[1],
457+
'refers' => $matches[2],
458+
);
459+
} else {
460+
$result = array(
461+
'content' => '',
462+
'refers' => $value,
463+
);
464+
}
449465
$result = array(
450466
'content' => '',
451467
'refers' => $value,

0 commit comments

Comments
 (0)