Skip to content

Commit ea697a1

Browse files
committed
fix(KTL-4236): Grammar: Links to documentation were broken
1 parent 852a847 commit ea697a1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

blocks/grammar/markdown.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ function rebaseRelativeUrl(href: string) {
2525
// Not a valid absolute URL, treat as relative path
2626
}
2727

28+
if (href.startsWith('#')) return href;
29+
2830
// Construct absolute URL using old grammar documentation as base
2931
url = new URL(href, `${OLD_GRAMMAR_HOST}${OLD_GRAMMAR_PATH}`);
3032

utils/mdToHtml.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export function Markdown(props: MarkdownProps) {
2323
options={{
2424
...props.options,
2525
overrides: {
26+
...overriddenClassNamesForTags,
2627
...props.options?.overrides,
27-
...overriddenClassNamesForTags
2828
}
2929
}}
3030
/>;

0 commit comments

Comments
 (0)