Skip to content

Commit

Permalink
Add support for the other of GistPad's two URI schemes (repo://) (#2646)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Dent <Jason3S@users.noreply.github.com>
  • Loading branch information
jnm2 and Jason3S committed Jun 8, 2023
1 parent 23159dd commit e1e6c11
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/_includes/generated-docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ Description
- `vscode-userdata` - Needed to spell check `.code-snippets`

Default
: [ _`"file"`_, _`"gist"`_, _`"sftp"`_, _`"untitled"`_, _`"vscode-notebook-cell"`_, _`"vscode-scm"`_, _`"vscode-userdata"`_ ]
: [ _`"file"`_, _`"gist"`_, _`"repo"`_, _`"sftp"`_, _`"untitled"`_, _`"vscode-notebook-cell"`_, _`"vscode-scm"`_, _`"vscode-userdata"`_ ]

---

Expand Down
2 changes: 1 addition & 1 deletion modules/__utils/uriHelper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { URI as Uri, Utils as UriUtils } from 'vscode-uri';

export const supportedSchemes = ['gist', 'file', 'sftp', 'untitled'];
export const supportedSchemes = ['gist', 'repo', 'file', 'sftp', 'untitled'];
export const setOfSupportedSchemes = new Set(supportedSchemes);

export function isSupportedUri(uri?: Uri): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface SpellCheckerSettings extends SpellCheckerShouldCheckDocSettings
* - `vscode-notebook-cell` - Used for validating segments of a Notebook.
* - `vscode-userdata` - Needed to spell check `.code-snippets`
* @scope window
* @default ["file", "gist", "sftp", "untitled", "vscode-notebook-cell", "vscode-scm", "vscode-userdata"]
* @default ["file", "gist", "repo", "sftp", "untitled", "vscode-notebook-cell", "vscode-scm", "vscode-userdata"]
*/
allowedSchemas?: string[];

Expand Down
2 changes: 1 addition & 1 deletion modules/_server/config/documentSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const defaultExclude: Glob[] = [
'__pycache__/**', // ignore cache files. cspell:ignore pycache
];

const defaultAllowedSchemes = ['gist', 'file', 'sftp', 'untitled', 'vscode-notebook-cell'];
const defaultAllowedSchemes = ['gist', 'repo', 'file', 'sftp', 'untitled', 'vscode-notebook-cell'];
const schemeBlockList = ['git', 'output', 'debug'];

const defaultRootUri = toFileUri(process.cwd()).toString();
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@
"default": [
"file",
"gist",
"repo",
"sftp",
"untitled",
"vscode-notebook-cell",
Expand Down
2 changes: 1 addition & 1 deletion packages/__utils/src/uriHelper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { URI as Uri, Utils as UriUtils } from 'vscode-uri';

export const supportedSchemes = ['gist', 'file', 'sftp', 'untitled'];
export const supportedSchemes = ['gist', 'repo', 'file', 'sftp', 'untitled'];
export const setOfSupportedSchemes = new Set(supportedSchemes);

export function isSupportedUri(uri?: Uri): boolean {
Expand Down
2 changes: 1 addition & 1 deletion packages/_server/spell-checker-config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@
"order": 3,
"properties": {
"cSpell.allowedSchemas": {
"default": ["file", "gist", "sftp", "untitled", "vscode-notebook-cell", "vscode-scm", "vscode-userdata"],
"default": ["file", "gist", "repo", "sftp", "untitled", "vscode-notebook-cell", "vscode-scm", "vscode-userdata"],
"items": {
"type": "string"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface SpellCheckerSettings extends SpellCheckerShouldCheckDocSettings
* - `vscode-notebook-cell` - Used for validating segments of a Notebook.
* - `vscode-userdata` - Needed to spell check `.code-snippets`
* @scope window
* @default ["file", "gist", "sftp", "untitled", "vscode-notebook-cell", "vscode-scm", "vscode-userdata"]
* @default ["file", "gist", "repo", "sftp", "untitled", "vscode-notebook-cell", "vscode-scm", "vscode-userdata"]
*/
allowedSchemas?: string[];

Expand Down
2 changes: 1 addition & 1 deletion packages/_server/src/config/documentSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const defaultExclude: Glob[] = [
'__pycache__/**', // ignore cache files. cspell:ignore pycache
];

const defaultAllowedSchemes = ['gist', 'file', 'sftp', 'untitled', 'vscode-notebook-cell'];
const defaultAllowedSchemes = ['gist', 'repo', 'file', 'sftp', 'untitled', 'vscode-notebook-cell'];
const schemeBlockList = ['git', 'output', 'debug'];

const defaultRootUri = toFileUri(process.cwd()).toString();
Expand Down

0 comments on commit e1e6c11

Please sign in to comment.