Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use actual nbsp character instead of HTML entity when avoiding wrapping rule names in rules list #172

Merged
merged 1 commit into from Oct 27, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rule-list-columns.ts
Expand Up @@ -70,7 +70,7 @@ export const COLUMN_HEADER: {
ruleNames.length > 0 &&
longestRuleDescriptionLength >= 60 &&
longestRuleNameLength > title.length
? ' '.repeat(longestRuleNameLength - title.length)
? ' '.repeat(longestRuleNameLength - title.length) // U+00A0 nbsp character.
: '';

return `${title}${spaces}`;
Expand Down
2 changes: 1 addition & 1 deletion test/lib/__snapshots__/generator-test.ts.snap
Expand Up @@ -443,7 +443,7 @@ exports[`generator #generate rule with long-enough description to require name c
"## Rules
<!-- begin auto-generated rules list -->
| Name&nbsp;&nbsp; | Description |
| Name   | Description |
| :----------------------------- | :---------------------------------------------------------------------------------- |
| [no-foo](docs/rules/no-foo.md) | over 60 chars over 60 chars over 60 chars over 60 chars over 60 chars over 60 chars |
Expand Down