Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HEAD as default branch rather than master #540

Merged
merged 1 commit into from Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -2,15 +2,15 @@

> _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

- [Node.js](https://nodejs.org/en/) at least `10.x.x`

## Usage

`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).
`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).

> **Warning:** When using vsce as a library be sure to sanitize any user input used in API calls, as a security measure.

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