| 57 |
$match[0] = preg_replace('/^[^\\\\]/', '', $match[0]); |
$match[0] = preg_replace('/^[^\\\\]/', '', $match[0]); |
| 58 |
|
|
| 59 |
// in markdown mode, the first match is part of the target. |
// in markdown mode, the first match is part of the target. |
| 60 |
|
// This is hacky and temporary while matching is in transition. |
| 61 |
if ($syntax == 'markdown') { |
if ($syntax == 'markdown') { |
| 62 |
$match[1] .= '|' . $match[2]; |
if (!$match[4]) { $match[4] = $match[3]; } |
| 63 |
|
else { $match[4] = $match[3] . ':' . $match[4]; } |
| 64 |
|
// encode pipes in Title. |
| 65 |
|
$match[2] = urlencode($match[2]); |
| 66 |
|
$match[1] = $match[4] . '|' . $match[2] . '|' . $match[5]; |
| 67 |
} |
} |
| 68 |
|
|
| 69 |
// default freelink (no colon) |
// default freelink (no colon) |
| 184 |
$link['error'] = t('Invalid Link'); |
$link['error'] = t('Invalid Link'); |
| 185 |
return; |
return; |
| 186 |
} |
} |
|
|
|
| 187 |
// title text is empty, insert from target or use URL |
// title text is empty, insert from target or use URL |
| 188 |
if (!$link[0]) { |
if (!$link[0]) { |
| 189 |
$link[0] = $target['text'] ? $target['text'] : $link[1]; |
$link[0] = $target['text'] ? $target['text'] : $link[1]; |
| 338 |
$args = array(); |
$args = array(); |
| 339 |
$args['target'] = $target; |
$args['target'] = $target; |
| 340 |
list($args['dest'], $args['text'], $args['tooltip'], $other) = explode('|', $target); |
list($args['dest'], $args['text'], $args['tooltip'], $other) = explode('|', $target); |
| 341 |
|
$args['text'] = urldecode($args['text']); |
| 342 |
return $args; |
return $args; |
| 343 |
} |
} |
| 344 |
|
|
| 353 |
$metatags = nodewords_get('node', $id); |
$metatags = nodewords_get('node', $id); |
| 354 |
$description = $metatags['description']; |
$description = $metatags['description']; |
| 355 |
} |
} |
|
if (empty($description)) { |
|
|
$n = node_load($id); |
|
|
$description = $n->teaser; |
|
|
} |
|
| 356 |
break; |
break; |
| 357 |
} |
} |
| 358 |
|
$description = str_replace('"', '\'', $description); |
| 359 |
return truncate_utf8($description, 200, FALSE, TRUE); |
return truncate_utf8($description, 200, FALSE, TRUE); |
| 360 |
} |
} |
| 361 |
|
|
| 421 |
$option['single_bracket'] = |
$option['single_bracket'] = |
| 422 |
'/[^\\\\]\[(.+' . $separator . '?.+)]/Uu'; |
'/[^\\\\]\[(.+' . $separator . '?.+)]/Uu'; |
| 423 |
$option['markdown'] = |
$option['markdown'] = |
| 424 |
'/[^\\\\]\[([^\[.]*)\]\((.+' . $separator . '.+)\)/Uu'; |
'/[^\\\\](\[([^\]]+)\]\((.+)(?:' . $separator . '(.+))?(?:\s"(.+)")?\))/Uu'; |
|
|
|
| 425 |
return $option; |
return $option; |
| 426 |
} |
} |
| 427 |
|
|