[wp-trac] [WordPress Trac] #30447: Line spacing in PREformatted text - found solution!

WordPress Trac noreply at wordpress.org
Fri Nov 21 17:13:27 UTC 2014


#30447: Line spacing in PREformatted text - found solution!
--------------------------+-----------------------------
 Reporter:  Kzrider       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  4.0
 Severity:  normal        |   Keywords:  pre autoembed
  Focuses:                |
--------------------------+-----------------------------
 I've found problem, that was described but unsolved:
 http://en.forums.wordpress.com/topic/irregular-line-spacing-in-
 preformatted-text

 Basicly when I use <pre> tag and put urls inside it, wordpress adds extra
 line spacing between them while displaying page:


 {{{
 <pre>http://some.link/
 http://some.other.link/</pre>
 }}}


 is converted to:


 {{{
 <pre>http://some.link/

 http://some.other.link/</pre>
 }}}


 The source of this is autoebeding feature. To be exact - in file class-wp-
 embed.php in function autoembed_callback( $match ) there is a line:


 {{{
 return "\n$return\n";
 }}}


 This is the source of problems.

 I'managed to turn off autoembeding in my wordpress site but I'm not
 familiar with wordpress to fix it. Hopefully, someone could repair it with
 knowledge about source of the problem. Preferably by turning off
 autoemneding inside <pre> and <code> tags.

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


More information about the wp-trac mailing list