Skip to content

Commit 3ccfd01

Browse files
committed
Make docs browser regex a bit more tolerant
1 parent 71f6cb0 commit 3ccfd01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/docsBrowser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export namespace DocsBrowser {
2727
let panel;
2828
try {
2929
// Make sure to use Uri.parse here, as path will already have 'file:///' in it
30-
panel = window.createWebviewPanel('haskell.showDocumentationPanel', ttl, ViewColumn.Two, {
30+
panel = window.createWebviewPanel('haskell.showDocumentationPanel', ttl, ViewColumn.Beside, {
3131
localResourceRoots: [Uri.parse(documentationDirectory)],
3232
enableFindWidget: true,
3333
});
@@ -57,7 +57,7 @@ export namespace DocsBrowser {
5757

5858
function processLink(ms: MarkedString): MarkedString {
5959
function transform(s: string): string {
60-
return s.replace(/\[(.+)\]\((file:.+\/doc\/.+\.html#?.+)\)/gi, (all, title, path) => {
60+
return s.replace(/\[(.+)\]\((file:.+\/doc\/.+\.html#?.*)\)/gi, (all, title, path) => {
6161
const encoded = encodeURIComponent(JSON.stringify({ title, path }));
6262
const cmd = 'command:haskell.showDocumentation?' + encoded;
6363
return `[${title}](${cmd})`;

0 commit comments

Comments
 (0)