Skip to content

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented Oct 5, 2025

This is a fifth pass at rewrapping things. The patterns I'm using aren't fully complete, but they're definitely an improvement over the current content.

It's a lot smarter than the first pass, but that required quite a bit more effort to define a fancy pattern.

References

Related to #8617 (comment)

```sh
perl -pi -e '
if (/\`\`\`/) {
  $s = ! $s;
  next;
};
next if $s;
next if /^#/;
s/([a-z)`]\.) +/$1\n/g;
'
```

Visual Studio Code search and replace.

Search:  (^(?!title|section| *```|/[*/]|\s*[{}])[^`#\n;][^\n]*[^-.:?!>\n\s{]) *$\n *(?!npm install|cd |\d+\.)([^-<$\s\n`+|#*;])
Replace: $1 $2
Flags: Case-sensitive, Regular expression

Manual wrap fixes.

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@jsoref jsoref requested a review from a team as a code owner October 5, 2025 02:06
@wraithgar wraithgar merged commit 268e4f8 into npm:latest Oct 5, 2025
16 checks passed
@jsoref jsoref deleted the rewrap-markdown-docs-workspaces-libnpmdiff branch October 5, 2025 03:59
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