Skip to content

Commit

Permalink
chore: bump version to 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsd-harry committed Dec 6, 2024
1 parent 29fd91c commit abceff0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion server/src/diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
TextEdit,
} from 'vscode-languageserver/node';

declare interface QuickFixData extends TextEdit {
export interface QuickFixData extends TextEdit {
title: string;
fix: boolean;
}
Expand Down
15 changes: 8 additions & 7 deletions server/src/test/diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ import {CodeActionKind} from 'vscode-languageserver/node';
import {getParams} from './util';
import {diagnose, quickFix} from '../diagnostic';
import type {Diagnostic, CodeAction, CodeActionParams} from 'vscode-languageserver/node';
import type {QuickFixData} from '../diagnostic';

const wikitext = `
http://a]
</p>
`,
params = getParams(__filename, wikitext),
diagnostics: Diagnostic[] = [
diagnostics: (Diagnostic & {data: QuickFixData[]})[] = [
{
range: {
start: {line: 1, character: 7},
end: {line: 1, character: 8},
start: {line: 1, character: 8},
end: {line: 1, character: 9},
},
severity: 1,
source: 'WikiLint',
Expand All @@ -22,7 +23,7 @@ http://a]
{
range: {
start: {line: 1, character: 0},
end: {line: 1, character: 1},
end: {line: 1, character: 0},
},
newText: '[',
title: 'Fix: left bracket',
Expand All @@ -35,7 +36,7 @@ http://a]
start: {line: 2, character: 0},
end: {line: 2, character: 4},
},
severity: 2,
severity: 1,
source: 'WikiLint',
message: 'unmatched closing tag',
data: [
Expand All @@ -58,7 +59,7 @@ http://a]
diagnostics: [diagnostics[0]!],
isPreferred: true,
edit: {
changes: {[params.textDocument.uri]: [diagnostics[0]!.data]},
changes: {[params.textDocument.uri]: diagnostics[0]!.data satisfies QuickFixData[]},
},
},
{
Expand All @@ -67,7 +68,7 @@ http://a]
diagnostics: [diagnostics[1]!],
isPreferred: false,
edit: {
changes: {[params.textDocument.uri]: [diagnostics[1]!.data]},
changes: {[params.textDocument.uri]: diagnostics[1]!.data satisfies QuickFixData[]},
},
},
];
Expand Down

0 comments on commit abceff0

Please sign in to comment.