Thank you for your interest in contributing to markdown-regex! This document outlines how to get started.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/markdown-regex.git cd markdown-regex - Install dependencies:
npm install
- Create a feature branch:
git checkout -b feature/my-feature
npm run dev # Watch mode (Rollup)
npm run build # Build distribution files
npm test # Run tests
npm run lint # Check linting issues
npm run lint:fix # Fix linting issues automatically- Add the pattern to the appropriate source file (
src/tags.jsorsrc/list.js) - Export it from
src/index.js - Add a TypeScript declaration in
src/index.d.ts - Write tests in the
tests/directory - Update
README.mdto document the new pattern
All new patterns must include tests. Run the full test suite before submitting:
npm testTest files live in tests/ and follow the naming convention <pattern-name>.test.js.
- Ensure all tests pass:
npm test - Ensure linting passes:
npm run lint - Update
README.mdfor any new patterns - Update
CHANGELOG.mdunder the[Unreleased]section - Open a pull request against the
mainbranch
This project uses ESLint and Prettier. Run npm run lint:fix to auto-format your code before committing.
By contributing, you agree that your contributions will be licensed under the MIT License.