ngx-bootstrap 20.0.1 → 20.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-bootstrap",
3
- "version": "20.0.1",
3
+ "version": "20.0.2",
4
4
  "description": "Angular Bootstrap",
5
5
  "author": "Dmitriy Shekhovtsov <valorkin@gmail.com>",
6
6
  "license": "MIT",
@@ -1,4 +1,4 @@
1
1
  {
2
- "NGX_BOOTSTRAP_VERSION": "20.0.1",
2
+ "NGX_BOOTSTRAP_VERSION": "20.0.2",
3
3
  "BOOTSTRAP_VERSION": "^5.2.3"
4
4
  }
@@ -1101,6 +1101,8 @@ class TypeaheadContainerComponent {
1101
1101
  // Replaces the capture string with the same string inside of a "strong" tag
1102
1102
  if (typeof query === 'object') {
1103
1103
  const queryLen = query.length;
1104
+ const PLACEHOLDER_CHAR = '\u2063'; // Invisible Separator
1105
+ const STRONG_PLACEHOLDER_COUNT = 17; // 8 + 9: strong tag length (opening and closing)
1104
1106
  for (let i = 0; i < queryLen; i += 1) {
1105
1107
  // query[i] is already latinized and lower case
1106
1108
  startIdx = itemStrHelper.indexOf(query[i]);
@@ -1110,7 +1112,8 @@ class TypeaheadContainerComponent {
1110
1112
  `${itemStr.substring(0, startIdx)}<strong>${itemStr.substring(startIdx, startIdx + tokenLen)}</strong>` +
1111
1113
  `${itemStr.substring(startIdx + tokenLen)}`;
1112
1114
  itemStrHelper =
1113
- `${itemStrHelper.substring(0, startIdx)}????????${'??'.repeat(tokenLen)}??????????` +
1115
+ `${itemStrHelper.substring(0, startIdx)}` +
1116
+ `${PLACEHOLDER_CHAR.repeat(STRONG_PLACEHOLDER_COUNT + tokenLen)}` +
1114
1117
  `${itemStrHelper.substring(startIdx + tokenLen)}`;
1115
1118
  }
1116
1119
  }