Fix * breaking response URL detection

Fixes #71
This commit is contained in:
Gregory Schier
2024-09-11 07:34:58 -07:00
parent b5fa3efb9e
commit ed48e1d52a
2 changed files with 7 additions and 3 deletions

View File

@@ -76,6 +76,10 @@
@apply underline;
}
&:hover > * {
@apply text-primary;
}
-webkit-text-security: none;
}
}
@@ -207,7 +211,7 @@
}
&::after {
@apply text-text bg-surface-highlight h-3 w-3 ml-1;
@apply text-text bg-text h-3 w-3 ml-1;
content: '';
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='black' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
-webkit-mask-size: contain;

View File

@@ -3,7 +3,7 @@ import { Decoration, hoverTooltip, MatchDecorator, ViewPlugin } from '@codemirro
import { EditorView } from 'codemirror';
const REGEX =
/(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&/=]*))/g;
/(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+*~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+*.~#?&/=]*))/g;
const tooltip = hoverTooltip(
(view, pos, side) => {
@@ -43,7 +43,7 @@ const tooltip = hoverTooltip(
};
},
{
hoverTime: 100,
hoverTime: 150,
},
);