# Contributing

## Reporting a bad conversion

The single most useful report includes:

1. The URL of the page
2. Which mode you used — Main content, Full page, or Selection
3. What the Markdown looked like, and what it should have looked like

Open an issue: https://github.com/lakshithalk/page-to-markdown/issues

## Working on the code

No build step and no dependencies. Clone it, load it unpacked at `chrome://extensions`, hit the reload arrow after each change.

```bash
node test/harness.mjs article   # convert test/fixture.html in node
./build.sh                      # produce dist/page-to-markdown-<version>.zip
```

Before opening a pull request:

- Run the fixture through `test/harness.mjs` in both `article` and `page` mode and check the diff is what you intended.
- Load `test/fixture.html` in Chrome and click the icon. The harness has no CSS engine, so hidden-element filtering only shows up in a real browser.
- If you've added support for a new element, add it to `test/fixture.html`.

## What will be turned down

- **Minified or obfuscated code**, including vendored libraries. Chrome Web Store reviewers must be able to read everything that ships, and so must users — that readability is the point of this project.
- **Network requests.** The extension makes none. Any feature that needs a server belongs in a fork.
- **New permissions**, unless the feature is worth the cost. Adding a permission disables the extension for every existing user until they re-accept it, and `activeTab`-only is the main reason to prefer this over the alternatives.

## Style

Plain modern JavaScript, no transpiler. Two-space indent. Comments explain *why*, not what.
