Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog (https://keepachangelog.com/en/1.0.0/) and this project adheres to Semantic Versioning (https://semver.org/spec/v2.0.0.html).

## [0.1.4] - 2025-10-04
### Changed
- Extension name: "WordPress Readme Preview" → "WordPress Readme"
- Enhanced description to highlight syntax highlighting and IntelliSense features
- Updated keywords to include "syntax highlighting", "intellisense", "autocomplete"

### Fixed
- IntelliSense completion no longer duplicates opening `==` when user has already typed them

## [0.1.3] - 2025-10-04
### Added
- Section heading IntelliSense completion provider (type `==` then space for valid section suggestions)
Expand Down Expand Up @@ -31,5 +40,6 @@ The format is based on Keep a Changelog (https://keepachangelog.com/en/1.0.0/) a
- Context menu integration across explorer, editor tab, and editor content
- Custom parser for WordPress readme formatting (FAQ, changelog headers, etc.)

[0.1.4]: https://github.com/soderlind/wordpress-readme-preview/compare/v0.1.3...v0.1.4
[0.1.3]: https://github.com/soderlind/wordpress-readme-preview/compare/v0.1.1...v0.1.3
[0.1.1]: https://github.com/soderlind/wordpress-readme-preview/compare/v0.1.0...v0.1.1
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WordPress Readme Preview
# WordPress Readme

A Visual Studio Code extension that provides live preview and validation for WordPress plugin `readme.txt` files with pixel-perfect WordPress.org rendering and comprehensive compliance checking.
A Visual Studio Code extension that provides syntax highlighting, IntelliSense, live preview and validation for WordPress plugin `readme.txt` files with pixel-perfect WordPress.org rendering and comprehensive compliance checking.

## Features

Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "wordpress-readme-preview",
"displayName": "WordPress Readme Preview",
"description": "Preview WordPress readme.txt files with accurate rendering and validation",
"version": "0.1.3",
"displayName": "WordPress Readme",
"description": "Preview, validate, and edit WordPress readme.txt files with syntax highlighting, IntelliSense, and accurate rendering",
"version": "0.1.4",
"publisher": "persoderlind",
"engines": {
"vscode": "^1.74.0"
Expand All @@ -21,7 +21,10 @@
"validation",
"wordpress.org",
"wp-plugin",
"readme.txt"
"readme.txt",
"syntax highlighting",
"intellisense",
"autocomplete"
],
"license": "GPL-2.0-or-later",
"repository": {
Expand Down
12 changes: 11 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,19 @@ export function activate(context: vscode.ExtensionContext) {
if (/==\s.*==/.test(line)) {
return undefined;
}

// Check if we already have opening '==' - if so, only insert name and closing ==
const hasOpeningEquals = prefix.includes('==');

return SECTION_HEADINGS.map(h => {
const item = new vscode.CompletionItem(h, vscode.CompletionItemKind.Module);
item.insertText = `== ${h} ==`;
if (hasOpeningEquals) {
// User already typed '==', just insert ' SectionName =='
item.insertText = ` ${h} ==`;
} else {
// Insert full format
item.insertText = `== ${h} ==`;
}
item.detail = 'WordPress readme section';
item.sortText = '0_' + h;
return item;
Expand Down