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

Crazy bug with image macro when it's inlined in table cell #549

Open
roseaysina opened this issue Jan 10, 2025 · 1 comment
Open

Crazy bug with image macro when it's inlined in table cell #549

roseaysina opened this issue Jan 10, 2025 · 1 comment
Labels

Comments

@roseaysina
Copy link

roseaysina commented Jan 10, 2025

Hola!

What happened?

When I paste image in table cell and set its width with macro and this image is located in directory with some symbols (like _ or -), mark doesn't render it and Confluence page is missing that image. No mistake is given during rendering.

What did you expect to happen?

The correct behaviour is when there is image in the table cell with correct width/height.

How can we reproduce the behavior you experienced?

<!-- Macro: \!\[.*\]\((.+)\)\<\!\-\- width=(.*) \-\-\>
     Template: ac:image
     Attachment: ${1}
     Width: ${2} -->
<!-- Parent: -1: Какие доступы необходимо получить разработчику -->
# Test Page Heading

| Heading                     | Heading                                                   |
|-----------------------------|-----------------------------------------------------------|
| just image                  | ![image](./pictures/test/1.png)                           |
| image with width            | ![image](./pictures/test/1.png)<!-- width=100 -->         |
| same image with 2-words-dir | ![image](./pictures/test_another/1.png)<!-- width=100 --> |

And this is the result:

image

See that the last attachment is missing.

Here is the dir layout:
image

I tried with different dir names and it seems that the error apperars when there is someting other than letters in directory name.
I guess the problem is in regexp but I have no idea how to modify it to work correctly. And furthermore if image locate outside of table (just in normal text) everything works fine.

Further Information

  • Mark Version: 11.2.0
  • Mark Parameters: --drop-h1 --title-from-h1
  • Confluence Hosting: self hosted
  • Confluence Version: 8.5.16 (app-confluence-2: 38e879cf)
  • Environment specific Information: Mac OS X and in CI/CD container

Is it normal or is it a bug? :)

@roseaysina roseaysina added the bug label Jan 10, 2025
@roseaysina
Copy link
Author

Futher investigation showed that if image wasn't uploaded without any macros in table cell - its attachment will be missing.
And after first render the second render shows attachment as expected.

Weird!

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

1 participant