mdrefine 0.2.0-rc.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +577 -0
- package/CODE_OF_CONDUCT.md +30 -0
- package/CONTRIBUTING.md +189 -16
- package/README.md +100 -154
- package/SECURITY.md +15 -13
- package/config.schema.json +91 -0
- package/dist/cli/diff.d.ts +10 -0
- package/dist/cli/diff.js +247 -0
- package/dist/cli/diff.js.map +1 -0
- package/dist/cli/main.js +270 -150
- package/dist/cli/main.js.map +1 -1
- package/dist/config/load.js +67 -6
- package/dist/config/load.js.map +1 -1
- package/dist/config/problems.d.ts +7 -0
- package/dist/config/problems.js +208 -0
- package/dist/config/problems.js.map +1 -0
- package/dist/config/resolve.d.ts +42 -109
- package/dist/config/resolve.js +193 -52
- package/dist/config/resolve.js.map +1 -1
- package/dist/core/directives.d.ts +7 -0
- package/dist/core/directives.js +25 -13
- package/dist/core/directives.js.map +1 -1
- package/dist/core/engine.d.ts +42 -4
- package/dist/core/engine.js +518 -79
- package/dist/core/engine.js.map +1 -1
- package/dist/core/frozen.d.ts +6 -0
- package/dist/core/frozen.js +15 -0
- package/dist/core/frozen.js.map +1 -0
- package/dist/core/scope.d.ts +30 -0
- package/dist/core/scope.js +122 -0
- package/dist/core/scope.js.map +1 -0
- package/dist/core/types.d.ts +202 -23
- package/dist/core/types.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +3 -0
- package/dist/node.js +4 -0
- package/dist/node.js.map +1 -0
- package/dist/rules/blocks.d.ts +34 -0
- package/dist/rules/blocks.js +550 -0
- package/dist/rules/blocks.js.map +1 -0
- package/dist/rules/content.d.ts +2 -0
- package/dist/rules/content.js +85 -0
- package/dist/rules/content.js.map +1 -0
- package/dist/rules/dialects.js +10 -6
- package/dist/rules/dialects.js.map +1 -1
- package/dist/rules/links.js +302 -6
- package/dist/rules/links.js.map +1 -1
- package/dist/rules/lists.d.ts +2 -0
- package/dist/rules/lists.js +924 -0
- package/dist/rules/lists.js.map +1 -0
- package/dist/rules/structure.js +127 -1
- package/dist/rules/structure.js.map +1 -1
- package/dist/rules/style.d.ts +8 -2
- package/dist/rules/style.js +1137 -165
- package/dist/rules/style.js.map +1 -1
- package/dist/syntax/block-identifier.d.ts +18 -0
- package/dist/syntax/block-identifier.js +24 -0
- package/dist/syntax/block-identifier.js.map +1 -0
- package/dist/syntax/obsidian.d.ts +29 -11
- package/dist/syntax/obsidian.js +9 -10
- package/dist/syntax/obsidian.js.map +1 -1
- package/dist/syntax/parse.d.ts +87 -3
- package/dist/syntax/parse.js +247 -19
- package/dist/syntax/parse.js.map +1 -1
- package/dist/workspace/access.d.ts +12 -3
- package/dist/workspace/access.js +33 -5
- package/dist/workspace/access.js.map +1 -1
- package/dist/workspace/discovery.d.ts +85 -0
- package/dist/workspace/discovery.js +155 -0
- package/dist/workspace/discovery.js.map +1 -0
- package/dist/workspace/encoding.d.ts +24 -0
- package/dist/workspace/encoding.js +113 -0
- package/dist/workspace/encoding.js.map +1 -0
- package/dist/workspace/files.d.ts +92 -6
- package/dist/workspace/files.js +715 -59
- package/dist/workspace/files.js.map +1 -1
- package/dist/workspace/git.d.ts +54 -0
- package/dist/workspace/git.js +198 -0
- package/dist/workspace/git.js.map +1 -0
- package/dist/workspace/index.d.ts +58 -3
- package/dist/workspace/index.js +136 -37
- package/dist/workspace/index.js.map +1 -1
- package/dist/workspace/selection.d.ts +2 -2
- package/dist/workspace/selection.js +3 -3
- package/dist/workspace/selection.js.map +1 -1
- package/dist/workspace/slug.js +8 -1
- package/dist/workspace/slug.js.map +1 -1
- package/dist/workspace/vault.js +3 -1
- package/dist/workspace/vault.js.map +1 -1
- package/docs/api.md +239 -0
- package/docs/benchmarks.md +140 -200
- package/docs/changelog.md +1 -0
- package/docs/cli.md +281 -89
- package/docs/configuration.md +193 -480
- package/docs/design.md +163 -284
- package/docs/dialects.md +169 -0
- package/docs/examples.md +151 -109
- package/docs/index.md +21 -37
- package/docs/integrations.md +144 -0
- package/docs/obsidian.md +91 -115
- package/docs/plugins.md +147 -212
- package/docs/quick-start.md +68 -74
- package/docs/rules.md +1237 -0
- package/docs/versions.md +56 -0
- package/examples/README.md +17 -14
- package/examples/automation/summarize-report.mjs +5 -2
- package/examples/library/lint-folder.mjs +5 -4
- package/examples/library/lint-workspace.mjs +32 -0
- package/examples/plugin/notes/release-checklist.md +2 -2
- package/examples/plugin/rules.mjs +17 -23
- package/examples/workspaces/obsidian-vault/after/mdtools.config.jsonc +2 -2
- package/examples/workspaces/obsidian-vault/before/mdtools.config.jsonc +2 -2
- package/examples/workspaces/repository-docs/after/README.md +2 -2
- package/examples/workspaces/repository-docs/after/mdtools.config.jsonc +0 -2
- package/examples/workspaces/repository-docs/before/README.md +2 -2
- package/examples/workspaces/repository-docs/before/docs/guide.md +7 -7
- package/examples/workspaces/repository-docs/before/docs/reference.md +3 -1
- package/examples/workspaces/repository-docs/before/mdtools.config.jsonc +0 -2
- package/package.json +38 -12
- package/docs/contributing.md +0 -218
- package/docs/releases/0.1.0-beta.1.md +0 -39
- package/docs/releases/0.1.0-beta.2.md +0 -83
- package/docs/releases/0.1.0-beta.3.md +0 -61
- package/docs/releases/0.1.0-beta.4.md +0 -50
- package/docs/releases/0.1.0-rc.1.md +0 -99
- package/docs/releases/0.2.0-rc.1.md +0 -141
- package/docs/releases/0.2.0-rc.2.md +0 -225
- package/docs/releases.md +0 -144
- package/docs/testing.md +0 -93
package/docs/contributing.md
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
# Contributing and development
|
|
2
|
-
|
|
3
|
-
This project is entirely agent-authored and agent-maintained. AI agents wrote
|
|
4
|
-
the code, tests, documentation, CI, and release tooling, and agents implement,
|
|
5
|
-
verify, and merge every change. It is **not human-maintained**; do not assume
|
|
6
|
-
that a person has reviewed generated changes. The repository owner does not
|
|
7
|
-
write, read, or review code and does not use the tool directly; they guide the
|
|
8
|
-
project lightly from its public documentation, from issue and PR descriptions,
|
|
9
|
-
and from documents that agents have processed with the tool, and assign agents
|
|
10
|
-
to tasks. The assigned agents make the architectural and design decisions.
|
|
11
|
-
Issues and pull requests from people and agents are welcome.
|
|
12
|
-
|
|
13
|
-
## Report a defect
|
|
14
|
-
|
|
15
|
-
Include the version, command, configuration, minimal Markdown input, actual
|
|
16
|
-
output, and expected rendering. A screenshot can explain a visible defect, but
|
|
17
|
-
the Markdown source is needed to reproduce it. Include JSON diagnostics when
|
|
18
|
-
available, and remove private content before posting examples.
|
|
19
|
-
|
|
20
|
-
Use the [issue tracker](https://github.com/viell-dev/slop-markdown-tools/issues)
|
|
21
|
-
for reproducible defects and feature requests. Agents should open issues only
|
|
22
|
-
when their operator has authorized publishing them.
|
|
23
|
-
|
|
24
|
-
Document corruption and changed rendering take priority over new style options.
|
|
25
|
-
Fixes should include a synthetic regression example, preserve meaning, and
|
|
26
|
-
verify that a second formatting pass leaves the output unchanged.
|
|
27
|
-
|
|
28
|
-
## Pull requests and compatibility
|
|
29
|
-
|
|
30
|
-
All changes to `main` require a pull request and passing CI. This includes
|
|
31
|
-
prereleases, version bumps, documentation, and dependency updates. Do not push
|
|
32
|
-
directly, bypass required checks, or rewrite shared history. Keep discussion
|
|
33
|
-
respectful and focused on reproducible behavior; harassment and disclosure of
|
|
34
|
-
private data are not acceptable. Contributions are provided under the MIT
|
|
35
|
-
license.
|
|
36
|
-
|
|
37
|
-
The branch policy requires the three CI checks and resolved review threads. It
|
|
38
|
-
does not require approval from a second account: this project is
|
|
39
|
-
agent-maintained and cannot assume another maintainer is available. Request
|
|
40
|
-
independent review when available, especially for file writes and release
|
|
41
|
-
automation. Passing CI is not a claim of human review.
|
|
42
|
-
|
|
43
|
-
The beta API and configuration may change; record changes in versioned release
|
|
44
|
-
notes and explain migration steps for incompatible behavior. Once published,
|
|
45
|
-
versions and release tags are never replaced. Follow the
|
|
46
|
-
[release procedure](releases.md) for preparation and publication. Security
|
|
47
|
-
reports belong in the private channel described in
|
|
48
|
-
[SECURITY.md](https://github.com/viell-dev/slop-markdown-tools/blob/main/SECURITY.md).
|
|
49
|
-
|
|
50
|
-
## Issue and pull request labels
|
|
51
|
-
|
|
52
|
-
Use one primary `Type:` label on every issue and PR, and at most one `Status:`
|
|
53
|
-
label describing the current disposition or next action. The type describes what
|
|
54
|
-
the item is about; a feature implementation PR also uses
|
|
55
|
-
`Type: Feature Request`. For mixed historical items, choose the main purpose and
|
|
56
|
-
explain separate decisions in comments. Split new requests when their parts need
|
|
57
|
-
independent scope decisions. Do not add priority labels. Assignees, milestones,
|
|
58
|
-
and projects are not used; labels, comments, and links between issues and pull
|
|
59
|
-
requests carry the state.
|
|
60
|
-
|
|
61
|
-
The
|
|
62
|
-
[label catalog](https://github.com/viell-dev/slop-markdown-tools/blob/main/.github/labels.json)
|
|
63
|
-
is the source of truth for exact names, descriptions, and hexadecimal colors.
|
|
64
|
-
Keep it, this guide, GitHub, issue templates, and Dependabot settings aligned.
|
|
65
|
-
Use the GitHub UI or the existing `gh` CLI; no label-sync service is required.
|
|
66
|
-
|
|
67
|
-
| Label | Color | Use |
|
|
68
|
-
| --------------------------- | --------- | ---------------------------------------------------------------------------- |
|
|
69
|
-
| `Type: Bug` | `#d73a4a` | Incorrect behavior, broken functionality, or a regression. |
|
|
70
|
-
| `Type: Enhancement` | `#a2eeef` | Improve an existing capability, including usability or performance. |
|
|
71
|
-
| `Type: Feature Request` | `#0e8a16` | Add a new independently useful capability or rule. |
|
|
72
|
-
| `Type: Maintenance` | `#6a737d` | Dependencies, CI, releases, refactoring, or repository upkeep. |
|
|
73
|
-
| `Type: Documentation` | `#0075ca` | Documentation, examples, or contributor instructions. |
|
|
74
|
-
| `Type: Discussion` | `#5319e7` | Explore a design or project direction before an actionable proposal. |
|
|
75
|
-
| `Type: Question` | `#d876e3` | Ask how the project works or how to use it. |
|
|
76
|
-
| `Status: Confirmed` | `#0e8a16` | Reproduced defect or accepted actionable request; not a delivery commitment. |
|
|
77
|
-
| `Status: Needs Information` | `#fbca04` | Waiting for reporter details, answers, or validation results. |
|
|
78
|
-
| `Status: Blocked` | `#d93f0b` | Accepted work is waiting on an identified external dependency. |
|
|
79
|
-
| `Status: Can't Reproduce` | `#fef2c0` | A documented reproduction attempt did not reproduce the report. |
|
|
80
|
-
| `Status: Duplicate` | `#cfd3d7` | Already tracked elsewhere; link the canonical issue or PR. |
|
|
81
|
-
| `Status: Won't Do` | `#666666` | Declined as out of scope or unsuitable in its proposed form. |
|
|
82
|
-
| `Good First Issue` | `#7057ff` | A scoped, ready task with a clear approach and beginner-friendly validation. |
|
|
83
|
-
| `Help Wanted` | `#008672` | A scoped, accepted task for which outside contributions are welcome. |
|
|
84
|
-
|
|
85
|
-
Review labels whenever answering, triaging, implementing, closing, reopening, or
|
|
86
|
-
otherwise updating an issue or PR:
|
|
87
|
-
|
|
88
|
-
- New items carry only a type label until an assigned agent reviews them. Use
|
|
89
|
-
`Status: Confirmed` only for a reproduced defect or an accepted request within
|
|
90
|
-
project scope; neither reproduction nor acceptance follows automatically from
|
|
91
|
-
a report.
|
|
92
|
-
- Correct the type when review shows the item to be a different kind than it was
|
|
93
|
-
filed as. A discussion that ends in an accepted change becomes a bug, an
|
|
94
|
-
enhancement, or a feature request. Keep the title accurate as well: it names
|
|
95
|
-
the confirmed problem or the accepted request.
|
|
96
|
-
- When a report contains a second problem that could be accepted, declined, or
|
|
97
|
-
validated on its own, move that problem to its own issue and link the two.
|
|
98
|
-
- When waiting on the reporter, use `Status: Needs Information` and state what
|
|
99
|
-
evidence is needed. Use `Status: Blocked` for an identified external
|
|
100
|
-
dependency, with a link and an unblock condition. Choose the immediate next
|
|
101
|
-
action rather than stacking statuses.
|
|
102
|
-
- Use `Status: Can't Reproduce` only after documenting the attempted version,
|
|
103
|
-
input, and result. An incomplete report first needs information.
|
|
104
|
-
- On duplicate closure, link the canonical item and retain `Status: Duplicate`.
|
|
105
|
-
On rejection, explain the scope or suitability decision and retain
|
|
106
|
-
`Status: Won't Do`. A declined proposal can be reconsidered with new evidence.
|
|
107
|
-
- An accepted issue stays open until its fix merges. The fixing pull request
|
|
108
|
-
names the issue with a closing keyword such as `Fixes #123` and carries the
|
|
109
|
-
same type label.
|
|
110
|
-
- On successful completion or merge, remove transient status labels and retain
|
|
111
|
-
the type. GitHub's open/closed/merged state records completion; there is no
|
|
112
|
-
redundant Done or Merged label. A closed, unmerged PR should retain its
|
|
113
|
-
applicable disposition, rather than being labeled as completed.
|
|
114
|
-
- On reopening, reassess the evidence and replace the old disposition; do not
|
|
115
|
-
carry a stale rejection, duplicate, or information request forward.
|
|
116
|
-
- Apply `Good First Issue` only to a ready, well-explained beginner task,
|
|
117
|
-
together with `Help Wanted`. Remove both when the item closes or is no longer
|
|
118
|
-
ready for contribution. Waiting for a reporter's private-workspace benchmark
|
|
119
|
-
is not a general help request.
|
|
120
|
-
|
|
121
|
-
Colors follow familiar GitHub cues: red for defects, blue for documentation,
|
|
122
|
-
green for accepted work, yellow/orange for missing information or blockers, and
|
|
123
|
-
gray for neutral or declined dispositions. Names carry the meaning without
|
|
124
|
-
relying on color. The unprefixed contributor labels follow
|
|
125
|
-
[GitHub's label conventions](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels);
|
|
126
|
-
the readiness criteria draw on the
|
|
127
|
-
[Kubernetes contributor guide](https://www.kubernetes.dev/docs/guide/help-wanted/).
|
|
128
|
-
The `Type:` / `Status:` grouping also appears in
|
|
129
|
-
[community label catalogs](https://gist.github.com/dysfunc/fc722e865a6a960a2d9c5ecf43f5a963);
|
|
130
|
-
this repository intentionally uses a smaller set.
|
|
131
|
-
|
|
132
|
-
## Develop locally
|
|
133
|
-
|
|
134
|
-
Follow the [checkout setup](quick-start.md#install-from-the-repository), then:
|
|
135
|
-
|
|
136
|
-
```sh
|
|
137
|
-
npm run check
|
|
138
|
-
npm run test:package
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
`check` runs TypeScript checks, ESLint, formatting checks, the documentation
|
|
142
|
-
site build, and the unit and integration tests. `test:package` packs the tool,
|
|
143
|
-
installs it into a temporary consumer project, and exercises the installed CLI
|
|
144
|
-
and library. It can require access to the npm registry. [Testing](testing.md)
|
|
145
|
-
describes the suites and where a new test belongs.
|
|
146
|
-
|
|
147
|
-
A change that could affect speed should be measured with `npm run benchmark`
|
|
148
|
-
before and after; [benchmarks](benchmarks.md) explains the report. A change to
|
|
149
|
-
an example, or to behavior an example shows, must keep the
|
|
150
|
-
[examples page](examples.md) accurate: the integration tests compare that page
|
|
151
|
-
with the files and with the tool's output.
|
|
152
|
-
|
|
153
|
-
GitHub Actions runs the full `check` and dependency audit on Linux with
|
|
154
|
-
Node.js 24. Linux with Node.js 22 and Windows with Node.js 24 run the build and
|
|
155
|
-
tests; all three jobs verify the installed package. Linting, formatting checks,
|
|
156
|
-
and documentation builds run once rather than on every platform. Superseded PR
|
|
157
|
-
runs are canceled.
|
|
158
|
-
|
|
159
|
-
Runtime dependencies have no OS-specific installation constraints. Development
|
|
160
|
-
tooling does include native platform packages, but that alone does not justify
|
|
161
|
-
repeating the full toolchain matrix. Windows coverage protects filesystem path
|
|
162
|
-
handling and installed command behavior; it has already caught a path-alias
|
|
163
|
-
regression. macOS is not a routine CI target.
|
|
164
|
-
|
|
165
|
-
A change is complete when everything that describes or depends on what it
|
|
166
|
-
changed agrees with it: tests, examples, documentation pages, the README,
|
|
167
|
-
release notes, and contributor and agent instructions. Nobody else will notice
|
|
168
|
-
when they drift apart, so update them in the same pull request.
|
|
169
|
-
|
|
170
|
-
Keep changes scoped and describe remaining limitations in the pull request.
|
|
171
|
-
Write the description for a reader who has not seen the code, and state the
|
|
172
|
-
design decisions the change makes and why: the repository owner does not read
|
|
173
|
-
the diff. Agent contributors should also read the repository's
|
|
174
|
-
[AGENTS.md](https://github.com/viell-dev/slop-markdown-tools/blob/main/AGENTS.md),
|
|
175
|
-
which describes what an assigned agent decides and the limits of that authority.
|
|
176
|
-
|
|
177
|
-
## Write and preview documentation
|
|
178
|
-
|
|
179
|
-
The site source lives in `docs/` on `main`. Edit these Markdown files directly;
|
|
180
|
-
VitePress supplies navigation, local search, and rendering. The site uses
|
|
181
|
-
VitePress 2 alpha because the stable 1.6 line currently retains vulnerable
|
|
182
|
-
development dependencies; site builds are verified in CI. Markdown Tools formats
|
|
183
|
-
and lints the site's own Markdown at its default 80-column width.
|
|
184
|
-
|
|
185
|
-
```sh
|
|
186
|
-
npm run format:docs
|
|
187
|
-
npm run format:docs:check
|
|
188
|
-
npm run docs:dev
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
To inspect the production build:
|
|
192
|
-
|
|
193
|
-
```sh
|
|
194
|
-
npm run docs:build
|
|
195
|
-
npm run docs:preview
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Open the URL printed by the preview server, including the
|
|
199
|
-
`/slop-markdown-tools/` base path. The site build fails on unresolved internal
|
|
200
|
-
page links; Markdown linting also checks local heading references.
|
|
201
|
-
|
|
202
|
-
Prettier formats implementation and configuration files and excludes Markdown.
|
|
203
|
-
`npm run format` runs both formatters. Synthetic fixtures under
|
|
204
|
-
`tests/fixtures/` and the example documents under `examples/workspaces/` and
|
|
205
|
-
`examples/plugin/notes/` are excluded from documentation formatting.
|
|
206
|
-
|
|
207
|
-
## Publish the site
|
|
208
|
-
|
|
209
|
-
The Pages workflow builds the static site from `main` and deploys only
|
|
210
|
-
`docs/.vitepress/dist/` as a GitHub Pages artifact. Generated output is ignored
|
|
211
|
-
by Git and excluded from the npm package. There is no publishing branch to
|
|
212
|
-
maintain. Pull requests build the site through CI without deploying it.
|
|
213
|
-
|
|
214
|
-
GitHub Pages must use **GitHub Actions** as its publishing source. Deployment
|
|
215
|
-
uses the `github-pages` environment and the workflow's short-lived token. See
|
|
216
|
-
GitHub's
|
|
217
|
-
[custom workflow documentation](https://docs.github.com/en/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages)
|
|
218
|
-
for deployment settings.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# mdrefine 0.1.0-beta.1
|
|
2
|
-
|
|
3
|
-
First public beta of Markdown Tools. npm package: `mdrefine`; executable:
|
|
4
|
-
`mdtools`. Requires Node.js 22.12 or newer.
|
|
5
|
-
|
|
6
|
-
## Features
|
|
7
|
-
|
|
8
|
-
- Separate lint and format commands with JSON reports, diff previews, stdin,
|
|
9
|
-
check mode, and explicit file writes.
|
|
10
|
-
- Configurable presets, per-file overrides, suppression comments, and custom
|
|
11
|
-
JavaScript rule and syntax plugins.
|
|
12
|
-
- Source-preserving formatting for CommonMark, GitHub Markdown, and Obsidian,
|
|
13
|
-
with a default wrap width of 80 columns.
|
|
14
|
-
- Local link and fragment validation, verified link path and notation changes,
|
|
15
|
-
GitHub tables and alerts, and Obsidian wikilinks, embeds, callouts, and block
|
|
16
|
-
references.
|
|
17
|
-
- Obsidian paragraph reflow requires verified `strictLineBreaks: true`.
|
|
18
|
-
|
|
19
|
-
## Packaging and maintenance
|
|
20
|
-
|
|
21
|
-
- The package name changed from the unpublished `@viell-dev/markdown-tools`
|
|
22
|
-
checkout name to `mdrefine`. Update library imports; the `mdtools` command,
|
|
23
|
-
configuration names, and suppression directives remain unchanged.
|
|
24
|
-
- Installed package checks cover the command shim, library exports, and public
|
|
25
|
-
TypeScript declarations on the supported CI platforms.
|
|
26
|
-
- Manual release preparation retains a tested tarball and checksum. Publishing
|
|
27
|
-
is separately gated and uses the npm `beta` channel.
|
|
28
|
-
- PR-based maintenance applies to prereleases as well as stable versions.
|
|
29
|
-
- Multiline inline code is preserved during reflow instead of triggering an
|
|
30
|
-
unsafe-format rejection.
|
|
31
|
-
|
|
32
|
-
## Known limits
|
|
33
|
-
|
|
34
|
-
The plugin API and configuration are provisional. Ambiguous links are reported
|
|
35
|
-
without guessing; unsupported syntax is preserved conservatively. Not every
|
|
36
|
-
Markdown layout is normalized. Review the
|
|
37
|
-
[design and limitations](https://viell-dev.github.io/slop-markdown-tools/design.html)
|
|
38
|
-
before adopting the beta across a vault. This project is developed and
|
|
39
|
-
maintained by agents without assumed human review.
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# mdrefine 0.1.0-beta.2
|
|
2
|
-
|
|
3
|
-
Second public beta of Markdown Tools. npm package: `mdrefine`; executable:
|
|
4
|
-
`mdtools`. Requires Node.js 22.12 or newer. Upgrade with:
|
|
5
|
-
|
|
6
|
-
```sh
|
|
7
|
-
npm install --save-dev --save-exact mdrefine@0.1.0-beta.2
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
## Correctness fixes
|
|
11
|
-
|
|
12
|
-
- Measure protected Markdown markers together with their preceding word before
|
|
13
|
-
wrapping, avoiding preventable line-width overflow.
|
|
14
|
-
- Prefer exact Obsidian workspace-root targets before suffix matches, respect
|
|
15
|
-
explicit relative paths, and verify target identity before rewriting links.
|
|
16
|
-
- Preserve compliant literal destination spelling, including `?` and `%`, and
|
|
17
|
-
escape literal percent/hash characters correctly when generating paths.
|
|
18
|
-
- Recognize existing directory targets instead of reporting them as missing.
|
|
19
|
-
Obsidian receives a directory-specific diagnostic; CommonMark/GitHub links can
|
|
20
|
-
resolve to directories. Directories are not rewritten to README files.
|
|
21
|
-
- Compare code-span line endings using their rendered space value while keeping
|
|
22
|
-
other code whitespace significant, allowing safe inline-code formatting.
|
|
23
|
-
- Fix parsing of inline Obsidian comments spanning several physical lines.
|
|
24
|
-
|
|
25
|
-
## New controls
|
|
26
|
-
|
|
27
|
-
- Opt-in `style/inline-code` joins multiline code spans without changing their
|
|
28
|
-
parsed content, including spans in lists and blockquotes.
|
|
29
|
-
- `style/wrap.measure: "codepoints"` counts Unicode scalar values instead of
|
|
30
|
-
display columns. Display columns remain the default.
|
|
31
|
-
- `style/wrap.reportUnreflowed` and `reportUnbreakable` optionally explain
|
|
32
|
-
protected paragraphs and remaining unbreakable overflow without changing
|
|
33
|
-
formatting safety or check-mode semantics.
|
|
34
|
-
- `resolve.gitIgnored` and `resolve.nestedRepositories` opt into additional link
|
|
35
|
-
targets independently of files selected for linting or writing.
|
|
36
|
-
- Repeatable `--exclude <path>` omits literal files or directory subtrees from
|
|
37
|
-
processing while preserving them in the link index. Filesystem aliases are
|
|
38
|
-
canonicalized consistently, including Windows short paths.
|
|
39
|
-
- Opt-in `structure/initial-heading` checks for an initial level-1 heading after
|
|
40
|
-
optional YAML/TOML front matter. It never edits content.
|
|
41
|
-
|
|
42
|
-
See
|
|
43
|
-
[configuration](https://viell-dev.github.io/slop-markdown-tools/configuration.html)
|
|
44
|
-
and [CLI workflows](https://viell-dev.github.io/slop-markdown-tools/cli.html)
|
|
45
|
-
for options, defaults, and examples.
|
|
46
|
-
|
|
47
|
-
## Performance and library API
|
|
48
|
-
|
|
49
|
-
Workspace indexing is path-only until a target's headings or block IDs are
|
|
50
|
-
needed. Fragment parsing, suffix lookups, and built-in schema validation reuse
|
|
51
|
-
cached work within their documented lifetimes; custom schema IDs stay isolated
|
|
52
|
-
between calls. A synthetic benchmark is available in `scripts/benchmark.mjs` in
|
|
53
|
-
the source checkout. Validation on the original large workspace remains pending
|
|
54
|
-
in [#23](https://github.com/viell-dev/slop-markdown-tools/issues/23); no
|
|
55
|
-
persistent index cache or worker pool is included.
|
|
56
|
-
|
|
57
|
-
`createWorkspace` accepts lazy Markdown source loaders and explicit directory
|
|
58
|
-
entries. Exhaustive consumers of `LinkResolution.status` must handle the new
|
|
59
|
-
`"directory"` result. Consumers constructing `ResolvedConfig` directly must
|
|
60
|
-
provide `resolve` (use `{}` for the defaults); `resolveConfig()` provides it for
|
|
61
|
-
normal callers. See the
|
|
62
|
-
[library API](https://viell-dev.github.io/slop-markdown-tools/plugins.html).
|
|
63
|
-
|
|
64
|
-
## Compatibility and project scope
|
|
65
|
-
|
|
66
|
-
Beta.1 configurations remain supported. The CLI name and Node.js minimum are
|
|
67
|
-
unchanged; new formatting and structural controls are opt-in.
|
|
68
|
-
|
|
69
|
-
For users of intermediate source checkouts, these additions were removed before
|
|
70
|
-
this release: `style/wrap.keepLabelWithAtom`, `--changed`, `--staged`,
|
|
71
|
-
`structure/title-matches-filename`, `structure/metadata-line`, and
|
|
72
|
-
`style/accidental-marker`. Remove those settings and implement consumer-specific
|
|
73
|
-
policies in plugins or wrappers. Git callers can supply explicit paths while
|
|
74
|
-
retaining workspace resolution; skip the CLI invocation for an empty selection.
|
|
75
|
-
These removals do not remove any published beta.1 feature.
|
|
76
|
-
|
|
77
|
-
Modified-date mutation remains consumer-owned. Semantic guards, conservative
|
|
78
|
-
handling of unsupported constructs, and Obsidian's verified strict-line-break
|
|
79
|
-
requirement remain in force. The plugin API and configuration are provisional.
|
|
80
|
-
|
|
81
|
-
Repository maintenance now includes explicit issue-scope review and a documented
|
|
82
|
-
label taxonomy. Full CI runs on Linux/Node.js 24, with compatibility and
|
|
83
|
-
installed-package checks on Linux/Node.js 22 and Windows/Node.js 24.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# mdrefine 0.1.0-beta.3
|
|
2
|
-
|
|
3
|
-
Third public beta of Markdown Tools. npm package: `mdrefine`; executable:
|
|
4
|
-
`mdtools`. Requires Node.js 22.12 or newer. Upgrade with:
|
|
5
|
-
|
|
6
|
-
```sh
|
|
7
|
-
npm install --save-dev --save-exact mdrefine@0.1.0-beta.3
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
## Correct wrap diagnostics
|
|
11
|
-
|
|
12
|
-
Protected paragraphs now distinguish breakable prose from indivisible inline
|
|
13
|
-
atoms. A hard-break paragraph whose only over-width content is a long link, code
|
|
14
|
-
span, or other protected atom no longer triggers `reportUnreflowed`. That
|
|
15
|
-
overflow follows `reportUnbreakable`, including when reflow is skipped. A
|
|
16
|
-
paragraph containing both causes can report both when enabled.
|
|
17
|
-
|
|
18
|
-
Whitespace inside protected inline nodes is not a wrapping opportunity.
|
|
19
|
-
Container prefixes count toward width; hard-break markers are excluded from
|
|
20
|
-
protected-line width. Both diagnostic options remain disabled by default and
|
|
21
|
-
propose no edits. Protected paragraph source remains unchanged.
|
|
22
|
-
|
|
23
|
-
Fixed in [PR #36](https://github.com/viell-dev/slop-markdown-tools/pull/36),
|
|
24
|
-
resolving [#34](https://github.com/viell-dev/slop-markdown-tools/issues/34).
|
|
25
|
-
Regression coverage includes both hard-break forms, LF/CRLF, lists, quotes, task
|
|
26
|
-
items, Unicode width measurement, and Obsidian's strict-line-break gate.
|
|
27
|
-
|
|
28
|
-
## Faster formatting
|
|
29
|
-
|
|
30
|
-
The formatter reuses the current parsed document between phases and for final
|
|
31
|
-
diagnostics. It parses each changed candidate and validates its meaning before
|
|
32
|
-
accepting it. Edit-range, overlap, oscillation, and convergence checks remain in
|
|
33
|
-
force; no persistent cache or worker pool is introduced.
|
|
34
|
-
|
|
35
|
-
A warmed synthetic benchmark improved approximately 2.3 times for input needing
|
|
36
|
-
edits and 2.6 times for already-formatted input, with identical result hashes.
|
|
37
|
-
On the reporter's 8,362-document, 36 MB workspace, `format --check --json` fell
|
|
38
|
-
from 314 to 121 seconds, with the same 6,960 would-change files and no remaining
|
|
39
|
-
diagnostics after formatting. These are workload-specific results, not a
|
|
40
|
-
throughput guarantee.
|
|
41
|
-
|
|
42
|
-
Implemented in
|
|
43
|
-
[PR #37](https://github.com/viell-dev/slop-markdown-tools/pull/37), resolving
|
|
44
|
-
[#35](https://github.com/viell-dev/slop-markdown-tools/issues/35).
|
|
45
|
-
Original-workload validation in
|
|
46
|
-
[#23](https://github.com/viell-dev/slop-markdown-tools/issues/23#issuecomment-5735871369)
|
|
47
|
-
also confirms the beta.2 indexing improvements and correct link diagnostics; the
|
|
48
|
-
performance issue is now closed. The source checkout includes
|
|
49
|
-
`scripts/benchmark-format.mjs` for reproducible formatting measurements.
|
|
50
|
-
|
|
51
|
-
## Compatibility
|
|
52
|
-
|
|
53
|
-
No dependency, public API, configuration-schema, or Node.js minimum changes.
|
|
54
|
-
Existing beta.2 configurations remain valid. Consumers enabling wrap diagnostics
|
|
55
|
-
may see findings move from `reportUnreflowed` to `reportUnbreakable`; this is
|
|
56
|
-
the intentional classification correction described above.
|
|
57
|
-
|
|
58
|
-
The API and configuration remain provisional. Semantic guards, conservative
|
|
59
|
-
handling of unsupported constructs, and Obsidian's verified strict-line-break
|
|
60
|
-
requirement remain in force. Repository agent instructions now also prohibit
|
|
61
|
-
self-references in GitHub issue and PR posts.
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# mdrefine 0.1.0-beta.4
|
|
2
|
-
|
|
3
|
-
Fourth public beta of Markdown Tools. npm package: `mdrefine`; executable:
|
|
4
|
-
`mdtools`. Requires Node.js 22.12 or newer. Upgrade with:
|
|
5
|
-
|
|
6
|
-
```sh
|
|
7
|
-
npm install --save-dev --save-exact mdrefine@0.1.0-beta.4
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
## Callout header diagnostics
|
|
11
|
-
|
|
12
|
-
An Obsidian callout title occupies one physical line. Over-width titles now
|
|
13
|
-
follow `style/wrap.reportUnbreakable`, even when they contain spaces, instead of
|
|
14
|
-
triggering `reportUnreflowed`. Body overflow is evaluated separately. A block
|
|
15
|
-
identifier does not make its entire paragraph indivisible; existing atom-aware
|
|
16
|
-
classification for those paragraphs is retained.
|
|
17
|
-
|
|
18
|
-
Fixed in [PR #42](https://github.com/viell-dev/slop-markdown-tools/pull/42),
|
|
19
|
-
resolving [#40](https://github.com/viell-dev/slop-markdown-tools/issues/40).
|
|
20
|
-
|
|
21
|
-
## Direct callout body wrapping
|
|
22
|
-
|
|
23
|
-
`style/wrap` now reflows supported Obsidian body prose directly below the
|
|
24
|
-
callout header, without requiring or inserting a blank quote line. The header's
|
|
25
|
-
physical line, title, folding marker, and container prefix remain intact. Body
|
|
26
|
-
reflow retains quote and list prefixes, protected inline atoms, and line
|
|
27
|
-
endings.
|
|
28
|
-
|
|
29
|
-
The semantic fingerprint now distinguishes the title from body text, rejecting
|
|
30
|
-
edits that move words across their boundary. Supported inline title formatting
|
|
31
|
-
still works. Hard breaks, block identifiers, inline HTML, unsupported multiline
|
|
32
|
-
syntax, and lazy or inconsistent quote continuations remain conservative cases.
|
|
33
|
-
Inline syntax spanning the title/body boundary is left untouched by wrapping.
|
|
34
|
-
|
|
35
|
-
Implemented in
|
|
36
|
-
[PR #43](https://github.com/viell-dev/slop-markdown-tools/pull/43), resolving
|
|
37
|
-
[#41](https://github.com/viell-dev/slop-markdown-tools/issues/41).
|
|
38
|
-
|
|
39
|
-
## Compatibility and verification
|
|
40
|
-
|
|
41
|
-
No dependency, public API, configuration-schema, or Node.js minimum changes.
|
|
42
|
-
Existing beta.3 configurations remain valid. Both diagnostic options remain
|
|
43
|
-
false by default and propose no edits. Consumers enabling them may see header
|
|
44
|
-
findings move to `reportUnbreakable`. Obsidian wrapping still requires verified
|
|
45
|
-
`strictLineBreaks: true`; CommonMark and GitHub behavior is unchanged.
|
|
46
|
-
|
|
47
|
-
Regression coverage includes nested callouts, list containers, folding markers,
|
|
48
|
-
LF/CRLF, both diagnostic flags, width modes, inline atoms, protected source,
|
|
49
|
-
rule isolation, semantic preservation, idempotence, unsafe boundary edits, and
|
|
50
|
-
CLI preview/write/check behavior. The API and configuration remain provisional.
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
# mdrefine 0.1.0-rc.1
|
|
2
|
-
|
|
3
|
-
First release candidate of Markdown Tools. npm package: `mdrefine`; executable:
|
|
4
|
-
`mdtools`. Requires Node.js 22.12 or newer. Upgrade with:
|
|
5
|
-
|
|
6
|
-
```sh
|
|
7
|
-
npm install --save-dev --save-exact mdrefine@0.1.0-rc.1
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
Release candidates publish to npm's `rc` channel, and `latest` follows them
|
|
11
|
-
until the first stable release.
|
|
12
|
-
|
|
13
|
-
## Fewer refused documents
|
|
14
|
-
|
|
15
|
-
The formatter's safety check refuses a whole document, and withholds a whole
|
|
16
|
-
`--write` batch, when a rule proposes an edit that would change the parsed
|
|
17
|
-
meaning. Five built-in rules proposed such edits for ordinary input; each now
|
|
18
|
-
produces a safe edit or leaves the construct alone:
|
|
19
|
-
|
|
20
|
-
- `style/wrap` keeps fence openers, math and Obsidian comment markers, HTML
|
|
21
|
-
block starts, footnote definitions, `--` and `=` runs, and words ending in an
|
|
22
|
-
unescaped backslash attached to a neighbour instead of moving them to a line
|
|
23
|
-
boundary ([PR #68](https://github.com/viell-dev/slop-markdown-tools/pull/68),
|
|
24
|
-
resolving [#46](https://github.com/viell-dev/slop-markdown-tools/issues/46)).
|
|
25
|
-
- `style/wrap` starts a task item's reflow after the checkbox and its separator,
|
|
26
|
-
so `[x]` and the following spacing survive
|
|
27
|
-
([PR #64](https://github.com/viell-dev/slop-markdown-tools/pull/64), resolving
|
|
28
|
-
[#47](https://github.com/viell-dev/slop-markdown-tools/issues/47)).
|
|
29
|
-
- `style/table` keeps each row's own cell count instead of padding short rows
|
|
30
|
-
with new cells
|
|
31
|
-
([PR #61](https://github.com/viell-dev/slop-markdown-tools/pull/61), resolving
|
|
32
|
-
[#48](https://github.com/viell-dev/slop-markdown-tools/issues/48)).
|
|
33
|
-
- `style/emphasis` and `style/strong` leave a node alone when the new marker
|
|
34
|
-
would touch an existing delimiter, such as `_*foo*_` or `*foo*_bar`
|
|
35
|
-
([PR #67](https://github.com/viell-dev/slop-markdown-tools/pull/67), resolving
|
|
36
|
-
[#49](https://github.com/viell-dev/slop-markdown-tools/issues/49)).
|
|
37
|
-
- `style/heading` escapes a trailing `#` run when converting a Setext heading,
|
|
38
|
-
so `Sharp #` becomes `## Sharp \#` rather than losing the `#`
|
|
39
|
-
([PR #66](https://github.com/viell-dev/slop-markdown-tools/pull/66), resolving
|
|
40
|
-
[#50](https://github.com/viell-dev/slop-markdown-tools/issues/50)).
|
|
41
|
-
|
|
42
|
-
## Obsidian link resolution
|
|
43
|
-
|
|
44
|
-
Note names, folder paths, and heading subpaths now match case-insensitively in
|
|
45
|
-
the Obsidian dialect, as Obsidian does, so `[[note]]` and `[[Note#heading two]]`
|
|
46
|
-
resolve to `Note.md` and `## Heading Two`. Notes whose paths differ only by case
|
|
47
|
-
are reported as ambiguous. Block identifiers still match exactly, and CommonMark
|
|
48
|
-
and GitHub resolution stays case-sensitive
|
|
49
|
-
([PR #69](https://github.com/viell-dev/slop-markdown-tools/pull/69), resolving
|
|
50
|
-
[#51](https://github.com/viell-dev/slop-markdown-tools/issues/51)).
|
|
51
|
-
|
|
52
|
-
## Line endings
|
|
53
|
-
|
|
54
|
-
Documents that use bare carriage returns are reflowed with carriage returns and
|
|
55
|
-
no longer end up with three line-ending styles. The line ending for new breaks
|
|
56
|
-
is taken from the document's first line break; previously a `\r\n` anywhere in
|
|
57
|
-
the document selected `\r\n`
|
|
58
|
-
([PR #65](https://github.com/viell-dev/slop-markdown-tools/pull/65), resolving
|
|
59
|
-
[#52](https://github.com/viell-dev/slop-markdown-tools/issues/52)).
|
|
60
|
-
|
|
61
|
-
## Performance
|
|
62
|
-
|
|
63
|
-
Measured on synthetic corpora with the scripts in `scripts/`:
|
|
64
|
-
|
|
65
|
-
- Applying many edits and locating many diagnostics were quadratic in the number
|
|
66
|
-
of edits or findings; both are now linear
|
|
67
|
-
([PR #58](https://github.com/viell-dev/slop-markdown-tools/pull/58) and
|
|
68
|
-
[PR #59](https://github.com/viell-dev/slop-markdown-tools/pull/59), resolving
|
|
69
|
-
[#53](https://github.com/viell-dev/slop-markdown-tools/issues/53) and
|
|
70
|
-
[#54](https://github.com/viell-dev/slop-markdown-tools/issues/54)).
|
|
71
|
-
- `style/wrap` and `style/table` detect the line ending once per document
|
|
72
|
-
instead of once per paragraph
|
|
73
|
-
([PR #60](https://github.com/viell-dev/slop-markdown-tools/pull/60), resolving
|
|
74
|
-
[#55](https://github.com/viell-dev/slop-markdown-tools/issues/55)).
|
|
75
|
-
- Formatting computes the original fingerprint only when an edit produces a
|
|
76
|
-
candidate, reuses the final pass's findings instead of a fourth rule sweep,
|
|
77
|
-
skips directive scanning when no directive text is present, and traverses
|
|
78
|
-
trees with a plain walk. On a 2,000-note vault, `lint` is about a third
|
|
79
|
-
faster, formatting changed notes about 40% faster, and re-formatting already
|
|
80
|
-
formatted notes about half the time
|
|
81
|
-
([PR #70](https://github.com/viell-dev/slop-markdown-tools/pull/70), resolving
|
|
82
|
-
[#56](https://github.com/viell-dev/slop-markdown-tools/issues/56)).
|
|
83
|
-
|
|
84
|
-
## Compatibility and verification
|
|
85
|
-
|
|
86
|
-
No public API, configuration-schema, or Node.js minimum changes. Existing beta.4
|
|
87
|
-
configurations remain valid. `unist-util-visit` is no longer a direct dependency
|
|
88
|
-
of the package. Behaviour differences to expect: nested emphasis such as
|
|
89
|
-
`*__foo__*` is now left as written rather than rewritten to `___foo___`;
|
|
90
|
-
documents mixing line endings follow their first line break; Obsidian vaults
|
|
91
|
-
containing notes that differ only by case receive new ambiguity diagnostics.
|
|
92
|
-
|
|
93
|
-
Regression coverage now includes direct tests for `style/heading`, wikilink
|
|
94
|
-
rewriting, dialect marker edge cases, end-of-document directives and comments,
|
|
95
|
-
CLI error paths, and a property test that mixes block-like atoms with list,
|
|
96
|
-
task, and quote prefixes
|
|
97
|
-
([PR #63](https://github.com/viell-dev/slop-markdown-tools/pull/63), resolving
|
|
98
|
-
[#57](https://github.com/viell-dev/slop-markdown-tools/issues/57)). The API and
|
|
99
|
-
configuration remain provisional until the first stable release.
|