You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f2da73e
Browse filesBrowse the repository at this point in the historyBrowse files
Apply shared one-sentence-per-line formatting during table-to-list fixes when the coordination option is enabled, preserving list-body indentation for top-level and nested entries.
Document and configure the option, and cover fixture, JavaScript, Python functional, and disabled behavior.
Replace the sandbox-incompatible optional-dependency subprocess test with an isolated in-process load so the full rule suite runs reliably.
# To override: Uncomment the block; set convert-to and/or excludePathPatterns. Disallow GFM tables; when convert-to is "list", suggest converting each table to a list.
355
+
# To override: Uncomment the block; set convert-to, one-sentence-per-line,
356
+
# and/or excludePathPatterns. Disallow GFM tables; when convert-to is "list",
357
+
# suggest converting each table to a list.
356
358
# Options (all optional):
357
359
# convert-to: string (default "none"); "none" = short message only, "list" = show suggested list format in detail
360
+
# one-sentence-per-line: bool (default false); split sentences in generated list items with list-body indentation
358
361
# excludePathPatterns: list of globs; skip this rule for matching file paths
Copy file name to clipboardExpand all lines: markdownlint-rules/README.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,7 +228,7 @@ The rule degrades gracefully when those files are absent.
228
228
229
229
### `no-tables`
230
230
231
-
**File:** `no-tables.js`
231
+
**Files:** `no-tables.js`, plus `one-sentence-per-line.js` and `one-sentence-per-line-sentence.js` for sentence-aware list conversion.
232
232
233
233
**Description:** Disallow GFM tables.
234
234
When `convert-to` is `"list"`, the rule suggests converting each table to a list (first column as **Header:**, remaining columns as indented `- header: cell`).
@@ -239,12 +239,16 @@ When `convert-to` is `"none"` (default), only a short message is reported and th
239
239
```yaml
240
240
no-tables:
241
241
convert-to: none # optional; "none" (default) or "list"
242
+
one-sentence-per-line: false # optional; split sentences in generated lists
242
243
# excludePathPatterns:
243
244
# - "**/README.md"
244
245
```
245
246
246
247
- **`convert-to`** (string, default `"none"`): `"none"` = report violation with short message only (no suggested list). `"list"` = include suggested list format in the error detail.
247
248
Only `"list"` and `"none"` are valid; invalid values are treated as `"none"`.
249
+
- **`one-sentence-per-line`** (boolean, default `false`): When `true`, sentence-split the generated list text using the same boundary detection as the `one-sentence-per-line` rule.
250
+
Continuation lines align with each list item's body: two spaces for top-level items and four spaces for the generated nested items.
251
+
Enable this option when the `one-sentence-per-line` rule is enabled because markdownlint isolates each custom rule's configuration.
248
252
- **`excludePathPatterns`** (list of strings, default none): Glob patterns for file paths where this rule is skipped.
249
253
250
254
**Behavior:** Reports every GFM table (outside fenced code blocks).
@@ -253,6 +257,7 @@ When `convert-to` is `"list"`, one error per table line (so `--fix` can replace
253
257
Suppress per table: put `<!-- no-tables allow -->` on the line before the table's first line, or at the end of that line.
254
258
255
259
**Fixable:** When `convert-to` is `"list"`, the rule reports `fixInfo` so `--fix` converts each table to the list format.
260
+
With `one-sentence-per-line: true`, the generated list is sentence-split during the same fix pass.
Copy file name to clipboardExpand all lines: md_test_files/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Each item: **filename** - custom rule(s) that fail; sub-bullet - what the fixtur
59
59
-**negative_no_h1_content.md** - no-h1-content
60
60
- Prose under the first h1 (only TOC-style content allowed there).
61
61
-**negative_no_tables.md** - no-tables
62
-
- GFM table reported; with default config (convert-to none) short message only; suppress via `<!-- no-tables allow -->`.
62
+
- GFM table reported; list conversion includes sentence-per-line content for top-level and nested list indentation; suppress via `<!-- no-tables allow -->`.
- Prose and list lines with multiple sentences (paragraph, bullet, numbered, nested); line with abbreviation (e.g.) not reported; ellipsis then new sentence (First... Then) reported.
65
65
-**positive_general.md** has a line with ellipsis in the middle of one sentence (not reported).
0 commit comments