Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ project:

- **Mandate caret requirements for all dependencies.** All crate versions
specified in `Cargo.toml` must use SemVer-compatible caret requirements (e.g.,
`some-crate = "1.2.3"`). This is Cargo's default and allows for safe,
`some-crate = "1.2.3"`). This is Cargo's default and allows for safe,
non-breaking updates to minor and patch versions while preventing breaking
changes from new major versions. This approach is critical for ensuring build
stability and reproducibility.
Expand Down Expand Up @@ -274,7 +274,7 @@ project:

- Use `tracing` for logging and diagnostics. Prefer structured
`tracing::{trace, debug, info, warn, error}` events and spans over `println!`,
`eprintln!`, or direct `log` macros. Add fields for identifiers, state, and
`eprintln!`, or direct `log` macros. Add fields for identifiers, state, and
error context so downstream subscribers can filter and correlate events
without parsing message text.
- Use `#[tracing::instrument]` or explicit spans around request handling,
Expand Down
9 changes: 4 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@
wrapping instead of stranding punctuation at line ends. (
[#293](https://github.com/leynos/mdtablefix/issues/293))
- Keep inflectional affixes (`s`, `'s`, `ed`, `ing`) and hyphenated compounds
attached to the preceding inline code span during paragraph reflow.
A suffix that directly follows a closing backtick fence is absorbed into the
code token, so the two never end up on separate lines after wrapping.
attached to the preceding inline code span during paragraph reflow. A suffix
that directly follows a closing backtick fence is absorbed into the code
token, so the two never end up on separate lines after wrapping.
([`#300`](https://github.com/leynos/mdtablefix/issues/300))
- Preserve inline GFM footnote references as unbreakable tokens when wrapping
Markdown paragraphs. ([#277](https://github.com/leynos/mdtablefix/issues/277))
- Preserve link reference definitions verbatim when `--wrap` is used, so
labels, URLs, and optional titles are never collapsed into prose or split
across lines.
([`#292`](https://github.com/leynos/mdtablefix/issues/292))
across lines. ([`#292`](https://github.com/leynos/mdtablefix/issues/292))
- Normalize whitespace-only artefacts during wrapping by rebalancing atomic
tails.
- Preserve trailing spaces on the final line when wrapping Markdown, retaining
Expand Down
20 changes: 10 additions & 10 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,15 +386,15 @@ module handles filesystem operations, delegating the text processing to
It keeps the current indent, emits wrapped or verbatim lines into the caller's
output buffer, and leaves inline fitting to the wrapping helpers.

`HtmlTableState` buffers candidate HTML table lines until the surrounding
table closes. Its depth counter tracks nested `<table>` blocks, so only the
outermost table is converted at once, while incomplete input can still be
flushed back verbatim.
`HtmlTableState` buffers candidate HTML table lines until the surrounding table
closes. Its depth counter tracks nested `<table>` blocks, so only the outermost
table is converted at once, while incomplete input can still be flushed back
verbatim.

The `footnotes::renumber::definitions` submodule owns definition scanning and
rewriting. `DefinitionScanState` coordinates the number mapping, collects
already-parsed definitions, and stages numeric candidates for later
conversion without cluttering the top-level renumber flow.
already-parsed definitions, and stages numeric candidates for later conversion
without cluttering the top-level renumber flow.

`ListState` tracks the active indentation stack and per-indent counters for
ordered list renumbering. It resets on headings and thematic breaks, and it
Expand Down Expand Up @@ -463,7 +463,7 @@ flowchart TD
Figure: `wrap_text` control flow. The wrapper classifies each incoming line,
passes fenced blocks, tables, headings, directives, and indented code through
unchanged, flushes paragraphs on blanks, routes prose and prefixed lines through
`ParagraphWriter`, computes visible widths with `unicode-width`, and delegates
`ParagraphWriter`, computes visible widths with `unicode-width`, and delegates
inline line fitting to `textwrap` before reconstructing the emitted Markdown
lines.

Expand Down Expand Up @@ -594,6 +594,6 @@ absorbed into the code token during tokenization by `scan_code_suffix_end` in
`src/wrap/tokenize/scanning.rs`. The combined code-and-suffix token is then
classified as atomic by `has_inline_code_structure` in
`src/wrap/inline/fragment.rs`, so wrapping treats the full string — for example,
`` `VarGuard`s ``, `` `class`'s ``, `` `fetch`ed ``, or `` `run`ning `` — as an
unbreakable unit. No line break is inserted between the closing backtick and the
following letters.
`` `VarGuard`s ``, `` `class`'s ``, `` `fetch`ed ``, or `` `run`ning `` — as
an unbreakable unit. No line break is inserted between the closing backtick and
the following letters.
Loading
Loading