All notable changes to this project will be documented in this file.
- Empty List Items: Fixed markdown formatter to remove empty list items (e.g. a trailing
-line with no content) instead of preserving a dangling marker line. - Code Block Language in Lists: Auto add
textlanguage specifier to unlabelled code fences nested inside list items during formatting, matching the existing behavior for top-level code blocks.
- Empty List Items: Added 34 unit tests covering marker edge cases (
-,*,+,1.,1)), indentation variants (spaces, tabs), list boundaries (start, middle, end, consecutive, before headings and paragraphs), code block content preservation, consecutive code blocks (unlabelled, mixed languages, separated by horizontal rules), and directformat_list_itemsbehavior.
- Formatter Header Trailing Colon: Fixed markdown formatter to remove trailing colons (
:) from heading text (e.g.## header:=>## header). - Formatter Code Block Language: Auto add
textlanguage specifier to unlabelled code blocks during formatting (e.g.```=>```text).
- List Bullet Point Unit Tests: Added unit test
test_format_list_item_asterisk_bullet_with_boldfor asterisk bullet items with bold headers (* **header**: value).
- List Bullet Point Emphasis Parsing: Fixed an issue where asterisk bullet list items followed by italicized text (e.g.,
* *header*: value) were incorrectly parsed as emphasis wrappers around spaces, causing* *to be stripped to a leading space. Opening and closing emphasis and bold markers are now strictly validated against whitespace boundaries.
- Table Formatter Unit Tests: Added unit test
test_format_markdown_table_empty_cell_trailing_spacesto verify empty cell formatting with trailing spaces.
- Table Empty Cell Formatting: Fixed table row formatting so empty cells format as
| |(single space) instead of auto-adding an extra space to format as| |.
- Strict Code Block Syntax Validation: Implemented unclosed code block detection to prevent linter and formatter from continuing on malformed markdown documents.
- Lint cascading failures: Halt linting immediately upon encountering an unclosed code block to avoid generating multiple unrelated false-positive style warnings and errors.
- Formatting safeguard: Abort formatting immediately and return a syntax error instead of writing corrupted contents to files.
- Nested lists with code blocks: Fixed a bug where a nested code block inside a list item that contained blank lines was parsed as premature list end, causing the rest of the document to be parsed inside an unclosed outer code block and silently discarded during formatting.
- Prevent code blocks nested inside markdown list items from being corrupted during formatting. This ensures their internal relative indentation is preserved and their content is not formatted as markdown text.
- Structured Parser: A new block-based parser in
src/parser.rsthat decomposes Markdown into logical elements (headings, code blocks, tables, lists, paragraphs). - YAML Frontmatter Support: Automatically extracts and preserves YAML frontmatter at the beginning of documents.
- Configurable Spacing: Added support for
blanks-around-fencesandblanks-around-listsoptions, configurable via.markdownlint.json.
- Formatting Architecture: Migrated from a line-based state machine to a more robust Parse-then-Format architecture.
- Improved Code Block Formatting: Enhanced handling of blank lines around fenced code blocks and recursive formatting of nested Markdown content.
- More consistent blank line compaction between paragraphs and document blocks.
- 100% test pass rate for existing and new test cases.
- Add recursive directory formatting:
agent-md .oragent-md fmt <dir>formats all.md/.markdownfiles recursively - Add unit tests for
collect_markdown_files - Add inline documentation for
collapse_spaces_before_commentandcompact_separator_row
- Collapse multiple spaces before # comments in bash/sh/zsh/text code blocks
- Enable token-saving format options by default and remove --token-saver flag
- Add code block with nested markdown content to format-all.md test file
- Extract validation rules into separate module
- Add table-trailing-spaces validation rule
- Add --human flag for pretty-printed JSON output
- Add example output for lint command with --human flag
- Add comprehensive test coverage for content processing and validation
- Add --human flag for pretty-printed JSON output
- Add comprehensive test coverage for content processing and validation
- Enforce ASCII graph detection in code blocks as errors
- Add version flag, logging rules, and improve CLI argument handling
- Add agent-md logo and update Vietnamese README introduction
- Add concrete before/after markdown examples to README files
- Add code formatting to command examples in README files
- Add Vietnamese translation of README
- Add MIT license section to README
- Update README title to emphasize LLM-friendly markdown focus
- Restructure README sections to improve clarity and flow
- Change validation rules from errors to warnings and improve code quality
- Initial release of agent-md (formerly ralph-md)
- Add lint-file command with human-readable output
- Add lint command for markdown validation
- Add README, single H1 validation rule, and markdown writing guide
- Add write-section command for targeted section updates
- Add --field option to read command for direct field extraction
- Add --content/-c flag to read command for section extraction
- Add space-indentation validation rule
- Skip validation inside code blocks and detect multiple violations per line
- Reorganize validation rules documentation with heading structure, code block, and list formatting validators
- Add AGENTS.md with project rules
- Add LLM agent integration guidelines
- Improve installation instructions
- Add no-duplicate-headings rule
- Update simple-tables rule examples
- Rename ralph-md to agent-md
- Flatten project structure
- Remove bold formatting from markdown documentation
- Add VS Code settings, project guide, and CI/CD configuration
- Add markdownlint config
- Normalize table separator rows: Automatically remove alignment colons (e.g.,
|:---|:---|becomes|---|---|) during formatting to save tokens - Update
simple-tableslint rule to reject alignment colons as errors - Update documentation and tests for table normalization
- Fix char-index vs byte-index bug in comment collapsing with Unicode characters
- Extend comment collapsing to
textcode blocks - Preserve leading indentation for comment-only lines in code blocks
- Update Vietnamese README examples and add markdown code block tests
- Apply formatting rules to markdown code blocks
- Remove extra blank lines throughout Vietnamese README
- Add GitHub repository link to intro blog post
- Expand intro blog with lint rules and VS Code extension details
- Add intro blog post and simplify logo design
- Add VS Code extension for agent-md formatter
- Add stdin formatting support and preserve code block indentation
- Add YAML frontmatter preservation and improve code formatting
- Preserve blank lines before code fences
- Configure language-specific formatters in VS Code settings
- Add MIT license and repository URL to VS Code extension
- Handle empty content before comments in code blocks
- Add comprehensive test coverage for HTML tags in Markdown
- Add test coverage for underscore handling in blockquotes
- Add Setext-style heading detection and validation
- Extract blockquote normalization logic into separate module
- Extract code block formatting logic into separate code_blocks module
- Extract table formatting logic into separate tables module
- Add implicit fmt command when markdown file path provided
- Compact table separator rows to exactly 3 dashes
- Preserve leading whitespace when collapsing spaces
- Add test coverage for validation rules and improve code formatting
- Enable token-saving format options by default
- fmt command: Preserves separator rows and code block content
- Improve table formatting to trim leading and trailing spaces from cells
- Add fmt command to auto-format markdown tables
- Add comprehensive test coverage for table formatting edge cases