projects
/
WP-Themes
/
staffords.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4209669
)
attempting regex to remove \n
author
Anthony Talarico
<talarico@gaslightmedia.com>
Mon, 23 Nov 2015 20:44:32 +0000
(15:44 -0500)
committer
Anthony Talarico
<talarico@gaslightmedia.com>
Mon, 23 Nov 2015 20:44:32 +0000
(15:44 -0500)
search.php
patch
|
blob
|
history
diff --git
a/search.php
b/search.php
index
5807e44
..
6a84b80
100644
(file)
--- a/
search.php
+++ b/
search.php
@@
-74,10
+74,11
@@
// Highlight matches
$context = nl2br(preg_replace('/'.str_replace('/', '\/', join('|', $terms)).'/i', '<strong>$0</strong>', $output));
+ $noNewLine = preg_replace('/[\n\r]+/', '', $context);
?>
<p class="search_result_context">
- <?php echo $
context
?>
+ <?php echo $
noNewLine
?>
</p>
<!-- End of the Contextual/Highlight Search -->