WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 3 months ago

#43104 closed enhancement (fixed)

Add Markdown trailing whitespace rule to `.editorconfig`

Reported by: netweb Owned by: johnbillion
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

With Gutenberg being merged as part of WordPress 5.0 having WordPress' build tools have parity with that of Gutenberg will be advantageous and one less issue to worry about when merge time comes.

This ticket adds support to .editorconfig to not trim trailing whitespace

See https://github.com/WordPress/gutenberg/blob/master/.editorconfig#L20-L21

Attachments (1)

43104.diff (312 bytes) - added by netweb 5 months ago.

Download all attachments as: .zip

Change History (6)

@netweb
5 months ago

#1 @netweb
5 months ago

  • Keywords has-patch commit added

#2 follow-up: @SergeyBiryukov
4 months ago

Added in https://github.com/WordPress/gutenberg/commit/906bbab2e157d953bd83abcd640899deffd83ef3.

Given that WordPress core does not have any .md files, not sure how necessary this is, though don't see any harm either :)

#3 in reply to: ↑ 2 @netweb
4 months ago

Replying to SergeyBiryukov:

Added in https://github.com/WordPress/gutenberg/commit/906bbab2e157d953bd83abcd640899deffd83ef3.

Given that WordPress core does not have any .md files, not sure how necessary this is, though don't see any harm either :)

I was being preemptive as Gutenberg includes lots of Markdown files and will be merged as part of WP 5.0 it is one task taken care of now rather than later at merge time 😏

#4 @johnbillion
3 months ago

  • Component changed from Build/Test Tools to General
  • Owner set to johnbillion
  • Status changed from new to reviewing

This also affects markdown files that you're editing that aren't part of core, for example a readme.md file that lives inside a plugin or theme. The rules for .editorconfig evidently bubble up in some editors.

#5 @johnbillion
3 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 42862:

General: Instruct file editors not to trim trailing whitespace in markdown files.

Two trailing spaces in a markdown file indicates a line break.

Props netweb

Fixes #43104

Note: See TracTickets for help on using tickets.