stephenharris/grunt-wp-deploy

RegExp for stable tag doesn't match lists in markdown

Closed this issue · 1 comments

Example header of a README.md:

# Plugin Name #
* Contributors: contributor
* Requires at least: 4.2
* Tested up to: 4.7
* Stable tag: 2.0.1
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html

The current RegExp requires that the line starts with Stable Tag. In my example it starts with an asterisk because of the list.

Allowing spaces, tabs and the asterisk would fix parsing the readme:

- var readmeVersion = readme.match( new RegExp("^Stable tag:\\s*(\\S+)","im") );
+ var readmeVersion = readme.match( new RegExp("^[ \t*]*Stable tag:\\s*(\\S+)","im") );

Thoughts?

Yes, I see no reason why that shouldn't be supported.