diff --git a/src/package.ts b/src/package.ts index 46dffdf..2dbd6fd 100644 --- a/src/package.ts +++ b/src/package.ts @@ -150,7 +150,7 @@ export class ReadmeProcessor extends BaseProcessor { const match = regex.exec(repository); if (match) { - return `https://raw.githubusercontent.com/${ match[1] }/${ match[2] }/master`; + return `https://github.com/${ match[1] }/${ match[2] }/raw/master`; } } } diff --git a/src/test/fixtures/readme/readme.expected.md b/src/test/fixtures/readme/readme.expected.md index 75c898c..d4a87ec 100644 --- a/src/test/fixtures/readme/readme.expected.md +++ b/src/test/fixtures/readme/readme.expected.md @@ -14,17 +14,17 @@ This README covers off: Load up a Markdown file and get highlights and hovers for existing issues. Checking will occur as you type in the document. -![Underscores and hovers](https://raw.githubusercontent.com/username/repository/master/images/SpellMDDemo1.gif) +![Underscores and hovers](https://github.com/username/repository/raw/master/images/SpellMDDemo1.gif) The status bar lets you quickly navigate to any issue and you can see all positions in the gutter. -![Jump to issues](https://raw.githubusercontent.com/username/repository/master/images/SpellMDDemo2.gif) +![Jump to issues](https://github.com/username/repository/raw/master/images/SpellMDDemo2.gif) The `spellMD.json` config file is watched so you can add more ignores or change mappings at will. -![Add to dictionary](https://raw.githubusercontent.com/username/repository/master/images/SpellMDDemo3.gif) +![Add to dictionary](https://github.com/username/repository/raw/master/images/SpellMDDemo3.gif) -![issue](https://raw.githubusercontent.com/username/repository/master/issue) +![issue](https://github.com/username/repository/raw/master/issue) # Install This extension is published in the VS Code Gallery. So simply hit 'F1' and type 'ext inst' from there select `SpellMD` and follow instructions. diff --git a/src/test/package.test.ts b/src/test/package.test.ts index 818efbd..896699e 100644 --- a/src/test/package.test.ts +++ b/src/test/package.test.ts @@ -352,7 +352,7 @@ describe('ReadmeProcessor', () => { }; const root = fixture('readme'); - const processor = new ReadmeProcessor(manifest, { baseContentUrl: 'https://raw.githubusercontent.com/username/repository/master' }); + const processor = new ReadmeProcessor(manifest, { baseContentUrl: 'https://github.com/username/repository/raw/master' }); const readme = { path: 'extension/readme.md', localPath: path.join(root, 'readme.md')