Show underline on link hover
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
80110d1a48
commit
e4f7c6add9
2 changed files with 13 additions and 2 deletions
|
@ -389,6 +389,9 @@ body {
|
||||||
a {
|
a {
|
||||||
color: var(--tc-link);
|
color: var(--tc-link);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
b {
|
b {
|
||||||
font-weight: var(--fw-medium);
|
font-weight: var(--fw-medium);
|
||||||
|
|
|
@ -13,9 +13,17 @@ import { sanitizeText } from './sanitize';
|
||||||
*/
|
*/
|
||||||
export function twemojify(text, opts, linkify = false, sanitize = true) {
|
export function twemojify(text, opts, linkify = false, sanitize = true) {
|
||||||
if (typeof text !== 'string') return text;
|
if (typeof text !== 'string') return text;
|
||||||
let content = sanitize ? twemoji.parse(sanitizeText(text), opts) : twemoji.parse(text, opts);
|
let content = text;
|
||||||
|
|
||||||
|
if (sanitize) {
|
||||||
|
content = sanitizeText(content);
|
||||||
|
}
|
||||||
|
content = twemoji.parse(content, opts);
|
||||||
if (linkify) {
|
if (linkify) {
|
||||||
content = linkifyHtml(content, { target: '_blank', rel: 'noreferrer noopener' });
|
content = linkifyHtml(content, {
|
||||||
|
target: '_blank',
|
||||||
|
rel: 'noreferrer noopener',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return parse(content);
|
return parse(content);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue