Skip to content
Snippets Groups Projects
Commit c10f01f4 authored by jojohoch's avatar jojohoch
Browse files

Recognize hyphens & ellipses as word symbols when marking words & areas

parent 780252b4
No related branches found
No related tags found
No related merge requests found
......@@ -16,10 +16,10 @@ export class MarkableSupport {
private ngUnsubscribe = new Subject<void>();
// eslint-disable-next-line max-len
private static wordsWithWhitespace: RegExp = /[^(\p{L}|\d)]*(\p{L}|\d)+[^(\p{L}|\d)]*|[^(\p{L}|\d)]+(\p{L}|\d)*[^(\p{L}|\d)]*|[^(\p{L}|\d)]*(\p{L}|\d)*[^(\p{L}|\d)]+/gu;
private static prefix: RegExp = /[^(\p{L}|\d)]+(?=(\p{L}|\d)+)/u;
private static word: RegExp = /(\p{L}|\d)+/u;
private static suffix: RegExp = /[^(\p{L}|\d)]+$/u;
private static wordsWithWhitespace: RegExp = /[^(\p{L}|\d\-')]*(\p{L}|\d|[-'])+[^(\p{L}|\d\-')]*|[^(\p{L}|\d\-')]+(\p{L}|\d|[-'])*[^(\p{L}|\d\-')]*|[^(\p{L}|\d\-')]*(\p{L}|\d|[-'])*[^(\p{L}|\d\-')]+/gu;
private static prefix: RegExp = /[^(\p{L}|\d\-')]+(?=(\p{L}|\d|[-'])+)/u;
private static word: RegExp = /(\p{L}|\d|[-'])+/u;
private static suffix: RegExp = /[^(\p{L}|\d\-')]+$/u;
constructor(
renderer: Renderer2,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment