[wp-trac] [WordPress Trac] #53391: Block editor Code and Preformatted failing to accept text

WordPress Trac noreply at wordpress.org
Sun Jun 13 12:52:01 UTC 2021


#53391: Block editor Code and Preformatted failing to accept text
---------------------------+-----------------------------
 Reporter:  seasoned_geek  |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Editor         |    Version:  5.7.2
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 This file
 https://www.logikalsolutions.com/wordpress/wp-content/uploads/2021/06/u18
 -sources-list.txt

 real name sources.list not that it matters. When I pull this into any text
 editor, be it on Windows or Ubuntu and select-all, copy, then paste it
 into either a Code bock or a Preformatted block it does this:

 [[Image(https://www.logikalsolutions.com/wordpress/wp-
 content/uploads/2021/06/broken-preformatted-block.png)]]

 The end of the file actually looks like this in every text editor


 {{{
 # backports:
 #
 #   Software from a newer release of the distribution, or even from the
 #   development branch of the distribution, but built against this
 release.
 #   It may provide newer features, but should be considered untested.
 #
 #   Note: Software in this repository WILL NOT receive any review or
 #         updates from the Ubuntu security team.
 #
 #deb     http://old-releases.ubuntu.com/ubuntu hardy-backports main
 restricted
 #deb-src http://old-releases.ubuntu.com/ubuntu hardy-backports main
 restricted
 #deb     http://old-releases.ubuntu.com/ubuntu hardy-backports universe
 #deb-src http://old-releases.ubuntu.com/ubuntu hardy-backports universe
 #deb     http://old-releases.ubuntu.com/ubuntu hardy-backports multiverse
 #deb-src http://old-releases.ubuntu.com/ubuntu hardy-backports multiverse

 }}}

 There is also an annoying thing happening when I scrape Linux shell
 scripts into Code blocks now. The first line is against the left margin
 and every other line is indented one space. Does not seem to matter what
 editor I scrape from. At first I thought it was a Scintilla based editor
 issue, then it happened with Notepad on Windows and Leafpad on older
 Ubuntu distros. Leafpad is as basic as basic editors get. It supports no
 formatting.

 I do not know if this cropped up earlier. I did not notice it until 5.7.2
 but I might not have been paying attention.

 I have a geek blog and post a lot of code so this is critical.

 I have even switched themes in case this happened only in one theme.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53391>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list