OCA / maintainer-tools

Odoo Maintainers Tools & conventions for OCA members which evaluate and maintain repositories.
GNU Affero General Public License v3.0
272 stars 455 forks source link

Error in markdown compilation if images are present #632

Open legalsylvain opened 2 hours ago

legalsylvain commented 2 hours ago

To Reproduce

Steps to reproduce the behavior:

  1. Create a module and add reference to images in the readme/xxx.rst files
  2. make a PR
  3. the process that transform .rst to .md file can fail, depending on the image ids.

See : https://github.com/OCA/server-tools/pull/3045

Error : https://github.com/OCA/server-tools/pull/3045#issuecomment-2394000480

Additional analysis from @thomaspaulb https://github.com/OCA/server-tools/pull/3045#issuecomment-2405526718

thanks !

thomaspaulb commented 2 hours ago

Though I think it might be a non-issue, people will just need to remember to not use image[0-9]? as caption for images in readme/*.md? Perhaps a more helpful message from an extra check that we do for forbidden captions in MD files?

legalsylvain commented 1 hour ago

Hi. no

Though I think it might be a non-issue, people will just need to remember to not use image[0-9]? as caption for images in readme/*.md?

No, that's not the issue. If we have a description.md file with many image all is OK. but if we have a second file (configure.md file) that contains also image it is failing. Something is so wrong in the compilation process. (.md -> .rst) file.

Step to reproduce :

thanks !

thomaspaulb commented 1 hour ago

Okay. But is the renaming of the second image text to something else a valid workaround?

legalsylvain commented 48 minutes ago

Okay. But is the renaming of the second image text to something else a valid workaround?

No. An annoying workaround ;-) We can not force contributors to manually change each image name for a unique one, as the md file is totally valid.

Try 1 :

DESCRIPTION.md

![image](../static/description/installed_modules_by_types.png)

![image](../static/description/module_authors.png)

CONFIGURE.md

![image](../static/description/default_module_type_rules.png)

![image](../static/description/add_module_type_rules.png)

-> fail.

DESCRIPTION.md

![image](../static/description/installed_modules_by_types.png)

![image](../static/description/module_authors.png)

CONFIGURE.md

![image1](../static/description/default_module_type_rules.png)

![image1](../static/description/add_module_type_rules.png)

-> fail

DESCRIPTION.md

![image](../static/description/installed_modules_by_types.png)

![image](../static/description/module_authors.png)

CONFIGURE.md

![image_1](../static/description/default_module_type_rules.png)

![image_2](../static/description/add_module_type_rules.png)

--> Success.