Skip to content

Commit e3b048d

Browse files
feat(documentation-ui): open links in new tab (#477)
1 parent aeb1bf8 commit e3b048d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

workspaces/documentation-ui/src/fetch.js

+3
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,8 @@ export async function fetchAndRenderByMenu(menuElement, kind = "flags") {
9393

9494
const documentContentElement = document.querySelector(`.documentation--${kind} .${CONSTANTS.DIV_CONTENT}`);
9595
documentContentElement.innerHTML = kind === "flags" ? htmlResponse : `<div>${htmlResponse}</div>`;
96+
documentContentElement.querySelectorAll("a").forEach((anchor) => {
97+
anchor.setAttribute("target", "_blank");
98+
});
9699
hljs.highlightAll();
97100
}

0 commit comments

Comments
 (0)