add comment for general hashtag in link is not the problem

This commit is contained in:
ogerly 2022-06-22 11:01:28 +02:00
parent 771f11ee90
commit 61679549d2
2 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,7 @@ export default class Hashtag extends TipTapMention {
get defaultOptions() {
return {
matcher: {
char: '#',
char: '=',
allowSpaces: false,
startOfLine: false,
},

View File

@ -11,7 +11,10 @@ export default class EventHandler extends Extension {
new Plugin({
props: {
transformPastedText(text) {
// remove hashtag from d.tube url
/* remove hashtag from d.tube url
* hashtags in url general are not a problem because the following link work like expected:
* http://www.nsosp.org/de/Quanten-Fluss-Theorie/index.php#OM:FrQFT:Home:Inhalt
*/
if ( text.search(/d.tube/) > 0) {
text = text.replace(/\/#!\//gim, '/')
}