[wp-trac] [WordPress Trac] #25387: Autoembeds don't work with paragraphs

WordPress Trac noreply at wordpress.org
Thu Apr 14 15:27:38 UTC 2016


#25387: Autoembeds don't work with paragraphs
-------------------------------------------+------------------
 Reporter:  Looimaster                     |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  4.6
Component:  Embeds                         |     Version:  3.6
 Severity:  normal                         |  Resolution:
 Keywords:  has-patch needs-testing early  |     Focuses:
-------------------------------------------+------------------

Comment (by azaozz):

 This is a good place to use the "tests first" approach:
 1. Decide exactly what the code has to do:
  * Match an URL when it is on a separate line. The current code does this.
  * Match an URL when it is the only content of a `<p>` tag excluding the
 actual tag and possibly matching line breaks before/after.
  * Anything else?
 2. Write unit tests for all cases.
 3. Write code that passes all unit tests.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/25387#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list