Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in markdown compilation if images are present #632

Open
legalsylvain opened this issue Oct 11, 2024 · 4 comments
Open

Error in markdown compilation if images are present #632

legalsylvain opened this issue Oct 11, 2024 · 4 comments
Labels

Comments

@legalsylvain
Copy link
Contributor

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 : OCA/server-tools#3045

Error : OCA/server-tools#3045 (comment)

Additional analysis from @thomaspaulb OCA/server-tools#3045 (comment)

thanks !

@thomaspaulb
Copy link

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
Copy link
Contributor Author

legalsylvain commented Oct 11, 2024

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 :

  • checkout server-tools / 17.0
  • delete module_analysis/README.rst file
  • run pre-commit -a

thanks !

@thomaspaulb
Copy link

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

@legalsylvain
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants