commit | 202836aa6b0bae921f8e853de983025899aaa782 | [log] [tgz] |
---|---|---|
author | Marc Kupietz <kupietz@ids-mannheim.de> | Wed Jun 28 20:58:17 2023 +0200 |
committer | Marc Kupietz <kupietz@ids-mannheim.de> | Wed Jun 28 20:58:17 2023 +0200 |
tree | c6e6b8518b1672203ade3e1de5d9a99875a6041b | |
parent | 3ef8bdacdce9725f53fb163a7121a8efe30184d7 [diff] [blame] |
Only boldify whole word, not part in participation Change-Id: Ic461b9a2cf23e06941ff3a2d327bcbf39256773e
diff --git a/R/common.R b/R/common.R index 83b8e5d..8d5be80 100644 --- a/R/common.R +++ b/R/common.R
@@ -74,7 +74,7 @@ } highliteSubstrings <- function (string, substrings) { - what = paste0('(', paste0(substrings, collapse="|"), ')') + what = paste0('(', paste0(substrings, collapse="(?=\\W)|"), '(?=\\W))') with = '<b>\\1</b>' str_replace_all(string, what, with) }