[wp-meta] [Making WordPress.org] #2881: The fix for unintended markdown is too greedy

Making WordPress.org noreply at wordpress.org
Thu Jun 15 23:01:11 UTC 2017


#2881: The fix for unintended markdown is too greedy
---------------------------+-----------------
 Reporter:  coffee2code    |      Owner:
     Type:  defect         |     Status:  new
 Priority:  normal         |  Milestone:
Component:  Developer Hub  |   Keywords:
---------------------------+-----------------
 Both
 [https://developer.wordpress.org/reference/functions/wp_transition_comment_status/
 wp_transition_comment_status()] and
 [https://developer.wordpress.org/reference/functions/wp_transition_post_status/
 wp_transition_post_status()] (and likely others) have consecutive hook
 names that contain underscores. Unfortunately,
 [https://meta.trac.wordpress.org/changeset/1138 as is known], underscores
 in function descriptions are treated as Markdown by the parser (and thus
 become `<em>` and `</em>` tags).

 `fix_unintended_markdown()` exists to fix these. However, its regex is too
 greedy, fixing only the unintended markup bookending a series of
 unintended markup. It should capture `<em>` and `</em>` pairs ungreedily.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2881>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list