Skip to content

Commit 520d933

Browse files
committed
chore: remove Preview Auto-fix Diff feature (activation, registration, docs)
1 parent b6640e8 commit 520d933

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ Tags are rendered as simple uppercase bracketed items (e.g. `[SEO] [CACHE]`) for
152152
| `WordPress Readme: Open Preview` | Command Palette, Context Menu | Open preview in current editor group |
153153
| `WordPress Readme: Open Preview to the Side` | Toolbar, Context Menu | Open side-by-side preview |
154154
| `WordPress Readme: Validate Readme` | Context Menu, Command Palette | Run validation and show detailed results |
155-
| `WordPress Readme: Preview Auto-fix Diff` | Command Palette | Open a diff view comparing current document vs proposed auto-fix changes (no edits applied) |
156155
| `WordPress Readme: Auto-fix Markdown to WordPress style` | Command Palette | Apply safe formatting fixes (normalize headings, code blocks, spacing) |
157156

158157
## Context Menu Integration

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"onLanguage:readme-txt",
4545
"onCommand:wordpress-readme.showPreview",
4646
"onCommand:wordpress-readme.showPreviewToSide",
47-
"onCommand:wordpress-readme.previewAutoFixDiff",
4847
"onWebviewPanel:wordpress-readme-preview"
4948
],
5049
"main": "./out/extension.js",

src/extension.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,6 @@ export function activate(context: vscode.ExtensionContext) {
4646
}
4747
);
4848

49-
const diffAutoFixCommand = vscode.commands.registerCommand(
50-
'wordpress-readme.previewAutoFixDiff',
51-
async () => {
52-
const editor = vscode.window.activeTextEditor;
53-
if (!editor) { return; }
54-
const doc = editor.document;
55-
const cfg = vscode.workspace.getConfiguration('wordpress-readme');
56-
const style = cfg.get<'indented' | 'fenced'>('autoFix.multiLineCodeStyle', 'indented');
57-
const original = doc.getText();
58-
const result = autoFixReadme(original, { multiLineStyle: style });
59-
if (result.updated === original) {
60-
vscode.window.showInformationMessage('Auto-fix would make no changes.');
61-
return;
62-
}
63-
const left = doc.uri;
64-
const right = vscode.Uri.parse(`${doc.uri.toString()}?autofix=preview`);
65-
await vscode.workspace.openTextDocument({ content: result.updated, language: doc.languageId, });
66-
// Use built-in diff: original vs transformed
67-
await vscode.commands.executeCommand('vscode.diff', left, right, 'Auto-fix Preview');
68-
}
69-
);
7049

7150
// Register text document content provider for custom scheme if needed
7251
const documentProvider = new ReadmeDocumentProvider();
@@ -170,7 +149,6 @@ export function activate(context: vscode.ExtensionContext) {
170149
showPreviewToSideCommand,
171150
validateReadmeCommand,
172151
autoFixCommand,
173-
diffAutoFixCommand,
174152
documentProviderRegistration,
175153
onDidOpenTextDocument,
176154
onDidChangeActiveTextEditor,

0 commit comments

Comments
 (0)