Closed dashaluna closed 3 years ago
Turns out this is being caused because @dashaluna's plugin isn't in the plugin directory yet, so the validateUrl()
calls all fail.
Probably not much that can be done about this.
I tracked this issue down to this slug guessing code:
https://github.com/wpreadme2markdown/wp-readme-to-markdown/blob/master/src/Converter.php#L52
Specific to my needs and this issue, the plugin name is not an adequate foundation to guess the plugin slug.
For: https://wordpress.org/plugins/sugar-calendar-lite/
The file extension check in findScreenshot()
also seems to find PNGs when JPGs are what's there.
I end up with:
http://ps.w.org/simple-event-management-–-sugar-calendar-(lite)/assets/screenshot-1.png
When I need:
https://ps.w.org/sugar-event-calendar/assets/screenshot-1.jpg
I think a PR should be achievable to correct both of these issues.
@JJJ you can supply the slug manually if it is detected incorrectly:
$markdown = \WPReadme2Markdown\Converter::convert($readme, 'my-slug-here');
Sorry I can't figure out how to get screenshots generated correctly.
Here is what I have in my
readme.txt
:And here is what gets generated:
I tried with my screenshot files in the main plugin directory and in
assets
subdirectory - the output is the same. All my screenshots arepng
and namedscreenshot-x
wherex
is the number from the list in the readme file.Thank you.