README
# markdown-formatter
A Native Gene that normalizes Markdown formatting for consistency.
## Usage
```bash
rotifer test markdown-formatter --input '{"markdown": "# Title\n* item1\n* item2\n", "listMarker": "-"}'
```
## Features
- Standardize list bullet markers (`-`, `*`, `+`)
- Normalize heading styles (ATX `#` or Setext underline)
- Enforce consistent blank line spacing
- Wrap long lines at configurable width
- Report number of changes applied
## Input
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `markdown` | string | Yes | Raw Markdown text |
| `lineWidth` | number | No | Max line width (default: 80) |
| `listMarker` | string | No | Bullet char: `-`, `*`, or `+` |
| `headingStyle` | string | No | `"atx"` or `"setext"` |
## Output
| Field | Type | Description |
|-------|------|-------------|
| `formatted` | string | Formatted Markdown |
| `changed` | boolean | Whether changes were made |
| `changeCount` | number | Number of changes applied |
A Native Gene that normalizes Markdown formatting for consistency.
## Usage
```bash
rotifer test markdown-formatter --input '{"markdown": "# Title\n* item1\n* item2\n", "listMarker": "-"}'
```
## Features
- Standardize list bullet markers (`-`, `*`, `+`)
- Normalize heading styles (ATX `#` or Setext underline)
- Enforce consistent blank line spacing
- Wrap long lines at configurable width
- Report number of changes applied
## Input
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `markdown` | string | Yes | Raw Markdown text |
| `lineWidth` | number | No | Max line width (default: 80) |
| `listMarker` | string | No | Bullet char: `-`, `*`, or `+` |
| `headingStyle` | string | No | `"atx"` or `"setext"` |
## Output
| Field | Type | Description |
|-------|------|-------------|
| `formatted` | string | Formatted Markdown |
| `changed` | boolean | Whether changes were made |
| `changeCount` | number | Number of changes applied |
Phenotype
Input
| Property | Type | Req | Description |
|---|---|---|---|
| markdown | string | ✓ | Raw Markdown text to format |
| lineWidth | number = 80 | Maximum line width for wrapping | |
| listMarker | - | * | + = - | List bullet character | |
| headingStyle | atx | setext = atx | Heading style |
Output
| Property | Type | Description |
|---|---|---|
| changed | boolean | Whether any formatting changes were made |
| formatted | string | Formatted Markdown text |
| changeCount | number | Number of formatting changes applied |
Raw JSON Schema
inputSchema
{
"type": "object",
"required": [
"markdown"
],
"properties": {
"markdown": {
"type": "string",
"description": "Raw Markdown text to format"
},
"lineWidth": {
"type": "number",
"default": 80,
"description": "Maximum line width for wrapping"
},
"listMarker": {
"enum": [
"-",
"*",
"+"
],
"type": "string",
"default": "-",
"description": "List bullet character"
},
"headingStyle": {
"enum": [
"atx",
"setext"
],
"type": "string",
"default": "atx",
"description": "Heading style"
}
}
} outputSchema
{
"type": "object",
"properties": {
"changed": {
"type": "boolean",
"description": "Whether any formatting changes were made"
},
"formatted": {
"type": "string",
"description": "Formatted Markdown text"
},
"changeCount": {
"type": "number",
"description": "Number of formatting changes applied"
}
}
} Arena History
| Date | Fitness | Safety | Calls |
|---|---|---|---|
| Mar 17 | 0.7050 | 0.76 | 1 |