Permalink
Browse files

💬 Some small updates to the popup

The deleted line was intended to remove the line breaks in the popup,
but wasn't doing anything because it was _in front_ of the variable it
was intended to modify. Howeer, I like the line breaks, so I simply
remove this line. Also I added an extra line break in front of the
timestamp and replaced the three dots with an ellipsis.
  • Loading branch information...
micgro42 committed Sep 21, 2018
1 parent 6691f68 commit 758ab990353d50fab4e3d4c0d98182b77bab75f0
Showing with 1 addition and 2 deletions.
  1. +1 −2 syntax.php
View
@@ -389,8 +389,7 @@ private function wikilinkPreviewPopup($id, $name)
// swap normal link title (popup) for a more useful preview
$link = html_wikilink($id, $name);
$meta = p_get_metadata($id, false, true);
$abstract = $meta['description']['abstract'] . '... ' . 'Edited: ' . date('Y-M-d', $meta['date']['modified']);
$preview = str_replace("\n", ' ', $preview);
$abstract = $meta['description']['abstract'] . '' . "\nEdited: " . date('Y-M-d', $meta['date']['modified']);
$preview = htmlentities($abstract, ENT_QUOTES, 'UTF-8');
$link = preg_replace('/title=\".+?\"/', 'title="' . $preview . '"', $link, 1);
return $link;

0 comments on commit 758ab99

Please sign in to comment.