Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Mar 5, 2021
2 parents 1ee5db4 + de9f8a7 commit f186af2
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -2,7 +2,7 @@

> _The Visual Studio Code Extension Manager_
[![Build Status](https://dev.azure.com/vscode/VSCE/_apis/build/status/VSCE?branchName=master)](https://dev.azure.com/vscode/VSCE/_build/latest?definitionId=16&branchName=master) [![npm version](https://badge.fury.io/js/vsce.svg)](https://badge.fury.io/js/vsce)
[![Build Status](https://dev.azure.com/vscode/VSCE/_apis/build/status/VSCE?branchName=main)](https://dev.azure.com/vscode/VSCE/_build/latest?definitionId=16&branchName=main) [![npm version](https://badge.fury.io/js/vsce.svg)](https://badge.fury.io/js/vsce)

## Requirements

Expand All @@ -24,7 +24,7 @@ Verify the installation:
vsce --version
```

`vsce` is meant to be mainly used as a command line tool. It can also be used a library since it exposes a small [API](https://github.com/microsoft/vscode-vsce/blob/master/src/api.ts). When using vsce as a library be sure to sanitize any user input used in API calls, as a security measurement.
`vsce` is meant to be mainly used as a command line tool. It can also be used a library since it exposes a small [API](https://github.com/microsoft/vscode-vsce/blob/main/src/api.ts). When using vsce as a library be sure to sanitize any user input used in API calls, as a security measurement.

## Usage via Docker

Expand Down
2 changes: 1 addition & 1 deletion src/package.ts
Expand Up @@ -592,7 +592,7 @@ export class MarkdownProcessor extends BaseProcessor {

const account = match[1];
const repositoryName = match[2].replace(/\.git$/i, '');
const branchName = githubBranch ? githubBranch : 'master';
const branchName = githubBranch ? githubBranch : 'HEAD';

return {
content: `https://github.com/${account}/${repositoryName}/blob/${branchName}`,
Expand Down
48 changes: 48 additions & 0 deletions src/test/fixtures/readme/readme.default.md
@@ -0,0 +1,48 @@
# README

>**Important:** Once installed the checker will only update if you add the setting `"spellMD.enable": true` to your `.vscode\settings.json` file.
This README covers off:
* [Functionality](#functionality)
* [Install](#install)
* [Run and Configure](#run-and-configure)
* [Known Issues/Bugs](#known-issuesbugs)
* [Backlog](#backlog)
* [How to Debug](#how-to-debug)

# Functionality

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://github.com/username/repository/raw/HEAD/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://github.com/username/repository/raw/HEAD/images/SpellMDDemo2.gif)](http://shouldnottouchthis/)
[![Jump to issues](https://github.com/username/repository/raw/HEAD/images/SpellMDDemo2.gif)](https://github.com/username/repository/blob/HEAD/monkey)
![](https://github.com/username/repository/raw/HEAD/images/SpellMDDemo2.gif)
<img src="https://github.com/username/repository/raw/HEAD/images/myImage.gif">

The `spellMD.json` config file is watched so you can add more ignores or change mappings at will.

![Add to dictionary](https://github.com/username/repository/raw/HEAD/images/SpellMDDemo3.gif)

![issue](https://github.com/username/repository/raw/HEAD/issue)

[mono](https://github.com/username/repository/blob/HEAD/monkey)
[not](http://shouldnottouchthis/)
[Email me](mailto:example@example.com)

# 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.


To clone the extension and load locally...

```
git clone https://github.com/Microsoft/vscode-SpellMD.git
npm install
tsc
```

>**Note:** TypeScript 1.6 or higher is required you can check with `tsc -v` and if you need to upgrade then run `npm install -g typescript`.
4 changes: 2 additions & 2 deletions src/test/fixtures/readme/readme.images.expected.md
Expand Up @@ -19,7 +19,7 @@ Load up a Markdown file and get highlights and hovers for existing issues. Chec
The status bar lets you quickly navigate to any issue and you can see all positions in the gutter.

[![Jump to issues](https://github.com/username/repository/path/to/images/SpellMDDemo2.gif)](http://shouldnottouchthis/)
[![Jump to issues](https://github.com/username/repository/path/to/images/SpellMDDemo2.gif)](https://github.com/username/repository/blob/master/monkey)
[![Jump to issues](https://github.com/username/repository/path/to/images/SpellMDDemo2.gif)](https://github.com/username/repository/blob/HEAD/monkey)
![](https://github.com/username/repository/path/to/images/SpellMDDemo2.gif)
<img src="https://github.com/username/repository/path/to/images/myImage.gif">

Expand All @@ -29,7 +29,7 @@ The `spellMD.json` config file is watched so you can add more ignores or change

![issue](https://github.com/username/repository/path/to/issue)

[mono](https://github.com/username/repository/blob/master/monkey)
[mono](https://github.com/username/repository/blob/HEAD/monkey)
[not](http://shouldnottouchthis/)
[Email me](mailto:example@example.com)

Expand Down
4 changes: 2 additions & 2 deletions src/test/package.test.ts
Expand Up @@ -1807,7 +1807,7 @@ describe('MarkdownProcessor', () => {
.onFile(readme)
.then(file => read(file))
.then(actual => {
return readFile(path.join(root, 'readme.expected.md'), 'utf8').then(expected => {
return readFile(path.join(root, 'readme.default.md'), 'utf8').then(expected => {
assert.equal(actual, expected);
});
});
Expand Down Expand Up @@ -1924,7 +1924,7 @@ describe('MarkdownProcessor', () => {
.onFile(readme)
.then(file => read(file))
.then(actual => {
return readFile(path.join(root, 'readme.expected.md'), 'utf8').then(expected => {
return readFile(path.join(root, 'readme.default.md'), 'utf8').then(expected => {
assert.equal(actual, expected);
});
});
Expand Down

0 comments on commit f186af2

Please sign in to comment.