fix github static url
This commit is contained in:
parent
541d855e24
commit
6b57852f5e
3 changed files with 6 additions and 6 deletions
|
@ -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`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
8
src/test/fixtures/readme/readme.expected.md
vendored
8
src/test/fixtures/readme/readme.expected.md
vendored
|
@ -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.
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Add table
Reference in a new issue