docs: optimized link style (#4027)

This commit is contained in:
msidolphin
2021-10-25 16:57:22 +08:00
committed by GitHub
parent 8fdf558b04
commit ef8a3534e1
2 changed files with 5 additions and 0 deletions

View File

@@ -22,6 +22,10 @@
.doc-content a {
display: inline-flex;
align-items: center;
&.vp-link {
white-space: nowrap;
word-break: keep-all;
}
.link-icon {
margin-left: 0.25rem;
height: 1em;

View File

@@ -78,6 +78,7 @@ export function insertLinkIcon(contentRef: any) {
)
links.forEach((link: any) => {
link.classList.add('vp-link')
if (
!link.href.startsWith(window.origin) &&
!link.innerHTML.includes('<img')