Skip to content

style: Collapse hard-wrapped Markdown prose to one line per paragraph - #8158

Open
mvadari wants to merge 2 commits into
developfrom
mvadari/prettier-prose-wrap
Open

style: Collapse hard-wrapped Markdown prose to one line per paragraph#8158
mvadari wants to merge 2 commits into
developfrom
mvadari/prettier-prose-wrap

Conversation

@mvadari

@mvadari mvadari commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

Set prettier's proseWrap to never for Markdown files (via a new .prettierrc.yaml, scoped so it doesn't also reflow YAML block scalars), and reflow all existing hard-wrapped Markdown prose to one paragraph per line as a result. This matches the convention already adopted in AGENTS.md/CONTRIBUTING.md in #8067, and makes it automatic going forward instead of relying on someone remembering to do it by hand.

Note: if we prefer wrapping the prose to a certain length, I'm fine with that - just want it to be consistent.

Context of Change

Single-line paragraphs diff more cleanly than hard-wrapped ones (a one-word edit no longer reflows the whole paragraph), and #8067 had already reflowed AGENTS.md/CONTRIBUTING.md manually to follow this style. This PR encodes it as a pre-commit/prettier rule so it applies repo-wide and stays enforced.

API Impact

N/A

Test Plan

  • pre-commit run --all-files passes.
  • Spot-checked diffs (docs/CodingStyle.md, README.md) — only prose paragraphs collapsed; tables, lists, and code blocks untouched.

Set prettier's proseWrap to never for Markdown files so paragraphs are
written and formatted as a single line rather than manually wrapped at
a fixed column, matching the convention already used in AGENTS.md.
@mvadari
mvadari requested a review from a team as a code owner September 1, 2026 21:23
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

xrplf-ai-reviewer[bot]

This comment was marked as resolved.

proseWrap:never collapsed each `> [!NOTE]`-style blockquote onto its
body line, which breaks GitHub/GitLab's alert-callout rendering (the
marker must be alone on the blockquote's first line). Mark each one
with a prettier-ignore comment so prettier leaves it split across two
lines, and fix two more instances the review missed (CONTRIBUTING.md,
docs/build/advanced_conan.md).

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure documentation reflow driven by a new prettier proseWrap=never rule scoped to *.md files. Diffs are mechanical (hard-wrapped prose collapsed to single lines); no code, logic, or config-wiring changes are present in the shown hunks. Nothing to flag.

@mvadari

This comment was marked as resolved.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new Prettier override uses a glob that won’t match Markdown files in subdirectories (so the repo-wide enforcement goal isn’t met), and there are a few fixable typos/punctuation issues in touched docs.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR standardizes Markdown formatting across the repo by disabling hard-wrapping for prose (one line per paragraph) via Prettier configuration, and then reformatting existing Markdown files accordingly to reduce noisy diffs on small edits.

Changes:

  • Add a Prettier override intended to set proseWrap: never for Markdown files.
  • Reflow existing hard-wrapped Markdown prose across docs/READMEs into single-line paragraphs.
  • Apply related Markdown formatting normalization (including some tables and admonition blocks) to match the new convention.
File summaries
File Description
tests/README.md Reflow prose paragraphs to single-line-per-paragraph.
src/xrpld/rpc/README.md Reflow prose paragraphs to single-line-per-paragraph.
src/xrpld/peerfinder/README.md Reflow prose paragraphs/lists to single-line-per-paragraph.
src/xrpld/app/rdb/README.md Reflow table formatting and prose.
src/xrpld/app/misc/README.md Reflow prose paragraphs/lists to single-line-per-paragraph.
src/xrpld/app/ledger/README.md Reflow prose paragraphs to single-line-per-paragraph.
src/xrpld/app/consensus/README.md Reflow prose and bullet formatting.
src/tests/README.md Reflow prose paragraphs to single-line-per-paragraph.
src/tests/libxrpl/csf/README.md Reflow prose and explanatory paragraphs to single-line-per-paragraph.
src/test/README.md Reflow prose paragraphs to single-line-per-paragraph.
README.md Reflow prose paragraphs to single-line-per-paragraph.
package/README.md Reflow prose and table formatting to single-line-per-paragraph.
nix/docker/README.md Reflow prose and tables to single-line-per-paragraph.
nix/check-tools/README.md Reflow prose to single-line-per-paragraph.
LICENSE.md Reflow license text into single-line paragraphs.
include/xrpl/shamap/README.md Reflow prose to single-line-per-paragraph.
include/xrpl/resource/README.md Reflow prose to single-line-per-paragraph.
include/xrpl/protocol/README.md Reflow prose to single-line-per-paragraph.
include/xrpl/protocol_autogen/README.md Reflow prose to single-line-per-paragraph.
include/xrpl/proto/README.md Reflow prose to single-line-per-paragraph.
include/xrpl/proto/org/xrpl/rpc/v1/README.md Reflow prose to single-line-per-paragraph.
include/xrpl/nodestore/README.md Reflow prose to single-line-per-paragraph.
include/xrpl/crypto/README.md Reflow prose to single-line-per-paragraph.
include/xrpl/consensus/README.md Reflow prose to single-line-per-paragraph.
include/xrpl/basics/README.md Reflow prose to single-line-per-paragraph.
docs/install.md Reflow prose and adjust admonition blocks alongside the new wrapping behavior.
docs/install-legacy.md Reflow prose and adjust admonition blocks alongside the new wrapping behavior.
docs/HeapProfiling.md Reflow prose to single-line-per-paragraph.
docs/CodingStyle.md Reflow prose and list items to single-line-per-paragraph.
docs/build/sanitizers.md Reflow prose and admonition blocks to single-line-per-paragraph.
docs/build/nix.md Reflow prose and admonition blocks to single-line-per-paragraph.
docs/build/nix_troubleshooting.md Reflow prose and admonition blocks to single-line-per-paragraph.
docs/build/environment.md Reflow prose to single-line-per-paragraph.
docs/build/depend.md Reflow prose to single-line-per-paragraph.
docs/build/conan.md Reflow prose to single-line-per-paragraph.
docs/build/advanced_conan.md Reflow prose and admonition blocks to single-line-per-paragraph.
docs/0010-ledger-replay/README.md Reflow prose to single-line-per-paragraph.
conan/lockfile/README.md Reflow prose to single-line-per-paragraph.
BUILD.md Reflow prose and tables to single-line-per-paragraph.
API-VERSION-2.md Reflow prose to single-line-per-paragraph.
API-CHANGELOG.md Reflow prose to single-line-per-paragraph.
.prettierrc.yaml Add Prettier config intended to enforce proseWrap: never for Markdown.
.github/scripts/rename/README.md Reflow prose to single-line-per-paragraph.
.github/scripts/levelization/README.md Reflow prose and tables to single-line-per-paragraph.
Review details
  • Files reviewed: 49/49 changed files
  • Comments generated: 5
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .prettierrc.yaml
# preserving manual line breaks (the prettier default). Scoped to Markdown
# only, since proseWrap also reflows YAML block scalars.
overrides:
- files: "*.md"
`SHAMapLeafNode` is an abstract class which publicly inherits directly from
`SHAMapTreeNode`. It isIt holds the
following data:
`SHAMapLeafNode` is an abstract class which publicly inherits directly from `SHAMapTreeNode`. It isIt holds the following data:
as a validator (the default) to running as a tracking peer. The [`Peer`
class](./Peer.h) has a variety of configurable parameters that control how it
behaves during the simulation.
The simulation code starts by creating a single instance of the [`Sim` class](./Sim.h). This class is used to manage the overall simulation and internally owns most other components, including the `Peer`s, `Scheduler`, `BasicNetwork` and `TrustGraph`. The next two lines create two differ `PeerGroup`s of size 5 and 1 . A [`PeerGroup`](./PeerGroup.h) is a convenient way for configuring a set of related peers together and internally has a vector of pointers to the `Peer`s which are owned by the `Sim`. `PeerGroup`s can be combined using `+/-` operators to configure more complex relationships of nodes as shown by `PeerGroup network`. Note that each call to `createGroup` adds that many new `Peer`s to the simulation, but does not specify any trust or network relationships for the new `Peer`s.
- `RCLConsensus` is implements the requirements of the generic
`Consensus` class by connecting to the rest of the `xrpld`
application.
- `RCLConsensus` is implements the requirements of the generic `Consensus` class by connecting to the rest of the `xrpld` application.
closed ledger. This is a consequence of Byzantanine failure. The purpose of
validations is to resolve the differences between servers and come to a common
conclusion about which last closed ledger is authoritative.
The most recent ledger that the server believes the network reached consensus on. Different servers can arrive at a different conclusion about the last closed ledger. This is a consequence of Byzantanine failure. The purpose of validations is to resolve the differences between servers and come to a common conclusion about which last closed ledger is authoritative.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants