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 {
|
||||
color: var(--tc-link);
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
b {
|
||||
font-weight: var(--fw-medium);
|
||||
|
|
|
@ -13,9 +13,17 @@ import { sanitizeText } from './sanitize';
|
|||
*/
|
||||
export function twemojify(text, opts, linkify = false, sanitize = true) {
|
||||
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) {
|
||||
content = linkifyHtml(content, { target: '_blank', rel: 'noreferrer noopener' });
|
||||
content = linkifyHtml(content, {
|
||||
target: '_blank',
|
||||
rel: 'noreferrer noopener',
|
||||
});
|
||||
}
|
||||
return parse(content);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue