[wp-meta] [Making WordPress.org] #2900: incorrect parsing of markdown in @param blocks
Making WordPress.org
noreply at wordpress.org
Tue Jun 27 00:28:38 UTC 2017
#2900: incorrect parsing of markdown in @param blocks
---------------------------+-----------------
Reporter: pbiron | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Developer Hub | Keywords:
---------------------------+-----------------
There is a problem with `phpdoc-parser` incorrectly parsing some markdown
in DocBlocs.
For example, see the `$name__like` @param in the hash of `$query` in
[[https://developer.wordpress.org/reference/classes/wp_term_query/__construct/|WP_Term_Query::__construct()]].
The problem is actually in `vendor/erusev/parsedown/Parsedown.php`, rather
than in `phpdoc-parser`, itself.
I just submitted a [[https://github.com/erusev/parsedown/pull/515|Pull
Request]] against `parsedown` with a fix. If/when they accept/merge that
PR, then DevHub should pull it and rebuild everything in the Code
Reference.
If they don't accept/merge (or take a long time to do so), then a short
term workaround is to modify the hash in all DocBlocs that use this
pattern to be like:
{{{#!php
/**
* ...
* @type string $name\__like Retrieve terms with criteria by which a
term is LIKE `$name\__like.
* ...
*/
}}}
i.e., add escapes to all occurrences of `__` **if** when it appears twice
in the same `@param` when the occurrence is **not** supposed indicate
`strong`.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2900>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list