mirror of
https://github.com/block-core/blockcore-notes.git
synced 2024-09-29 06:20:42 +00:00
Fix support for apostrophe + s after tagging someone
This commit is contained in:
parent
6bc8c0899f
commit
0391a5abcd
@ -68,9 +68,9 @@
|
||||
|
||||
<span class="event-content clickable" [ngClass]="{ 'event-content-big': content && content.length < 7 }">
|
||||
<ng-container *ngFor="let token of dynamicText">
|
||||
<ng-template [ngIf]="isString(token)"> {{ token }} </ng-template>
|
||||
<ng-template [ngIf]="isString(token)">{{ token }}</ng-template>
|
||||
<ng-template [ngIf]="!isString(token)" [ngSwitch]="token.token">
|
||||
<ng-container *ngSwitchCase="'username'"><a class="reply-link" [routerLink]="['/p', token.word]">@{{ getDisplayName(token.word) }}</a> </ng-container>
|
||||
<ng-container *ngSwitchCase="'username'"><a class="reply-link" [routerLink]="['/p', token.word]">@{{ getDisplayName(token.word) }}</a></ng-container>
|
||||
<ng-container *ngSwitchCase="'linebreak'"><br /></ng-container>
|
||||
</ng-template>
|
||||
|
||||
|
@ -287,7 +287,9 @@ export class ContentComponent {
|
||||
|
||||
for (let index = 0; index < lines.length; index++) {
|
||||
const line = lines[index];
|
||||
let lineTokens = line.split(/\s+/);
|
||||
//let lineTokens = line.split(/\s+/);
|
||||
let lineTokens = line.split(/(\s|'s)/g);
|
||||
|
||||
lineTokens = lineTokens.filter((entry) => entry != '');
|
||||
lineTokens.push('<br>');
|
||||
tokens.push(...lineTokens);
|
||||
|
Loading…
Reference in New Issue
Block a user