A Visual Studio Code extension that intelligently adjusts Markdown heading levels using document structure analysis. Unlike traditional regex-based approaches, it safely avoids modifying # symbols within code blocks and inline comments.
Quickstart
Install the extension from the Visual Studio Code marketplace.
Select the text you want to adjust the heading level for.
Open the command palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) and search for one of the following commands:
Increase Heading Level: Increase the heading level of the selected text.
Decrease Heading Level: Decrease the heading level of the selected text.
Batch Adjust Heading Level: Batch adjust the heading level of the selected text by a specific shift.
Development Guide
Clone the repository and open the project in Visual Studio Code.
Run npm install to install the required dependencies.
Open the .vscode/launch.json file and ensure the following configurations are present:
An "extensionHost" launch task.
The "args" array contains "--disable-extensions".
The "preLaunchTask" is set to "npm: compile".
To run the extension in development mode, press F5 or select "Start Debugging" from the Run menu.
To run the tests, open the command palette and search for "Tasks: Run Test Task", then select "npm: test".
Acknowledgements
Note: This is a fork of Heading Level Adjuster with significant enhancements for structure-aware heading adjustment.