Skip to content

feat(format): add highlight and underline support#156

Merged
YousefHadder merged 2 commits intomainfrom
feat/highlight-underline
Dec 10, 2025
Merged

feat(format): add highlight and underline support#156
YousefHadder merged 2 commits intomainfrom
feat/highlight-underline

Conversation

@YousefHadder
Copy link
Copy Markdown
Owner

@YousefHadder YousefHadder commented Dec 10, 2025

Adds support for highlight (==) and underline (++) formatting.

Includes:

  • Implementation in lua/markdown-plus/format/init.lua
  • Tests in spec/markdown-plus/format_spec.lua
  • Documentation updates in doc/markdown-plus.txt (fixed vimdoc formatting)

Copilot AI review requested due to automatic review settings December 10, 2025 17:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for two extended Markdown formatting styles: highlight (==text==) and underline (++text++), commonly used in editors like Obsidian and Typora but not part of standard GitHub Flavored Markdown.

Key Changes:

  • Added pattern definitions and formatting logic for highlight and underline
  • Implemented keymaps <leader>mh (highlight) and <leader>mu (underline) following existing conventions
  • Added comprehensive test coverage for both new formatting types

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
lua/markdown-plus/format/init.lua Added pattern definitions for highlight/underline, implemented keymaps, updated word boundary detection to include = and + characters, and updated clear_formatting functions to handle new formats
spec/markdown-plus/format_spec.lua Added comprehensive unit tests for detecting, adding, and removing highlight and underline formatting, plus pattern verification tests
doc/markdown-plus.txt Documented the new formatting features with usage examples, keymaps, compatibility notes explaining platform support differences, and updated API reference

@YousefHadder YousefHadder merged commit c7c9357 into main Dec 10, 2025
16 checks passed
@YousefHadder YousefHadder deleted the feat/highlight-underline branch December 10, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants