Skip to content

Commit

Permalink
fix: Replace spaces with - to match what confluence uses.
Browse files Browse the repository at this point in the history
Fixes: #223
  • Loading branch information
andymac4182 committed Apr 28, 2023
1 parent e2d6771 commit 92b9d2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/lib/src/MarkdownTransformer/wikilinks.ts
Expand Up @@ -34,7 +34,8 @@ export function wikilinks(state: StateInline): boolean {
headerStart > 0 ? headerStart : wikiLinkEnd,
aliasStart > 0 ? aliasStart - 1 : wikiLinkEnd
);
const linkToPage = state.src.slice(pageNameStart, pageNameEnd);
let linkToPage = state.src.slice(pageNameStart, pageNameEnd);
linkToPage = linkToPage.replace(/\s+/g, "-");

if (alias) {
state.pos = aliasStart;
Expand Down

0 comments on commit 92b9d2d

Please sign in to comment.