Skip to content

Conversation

@ao6swind
Copy link
Contributor

@ao6swind ao6swind commented Oct 3, 2025

Hello, I found that when there are multiple tags in the HTML, the conversion to OpenXML fails.

For example:

<table>
  <tr>
    <td>
       <img src="https://domain/a.png">
       <img src="https://domain/b.png">
    </td>
  </tr>
</table>

This snippet will throw an error in ImagePrefetcher.cs.

I attempted to fix it,

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 3, 2025

@onizet
Copy link
Owner

onizet commented Oct 4, 2025

@ao6swind Very very good PR!
First it solves a nasty bug, but your code is very nice with a minimal locking time.

Just one small remark: GetIdOfPart is cross-thread safe as its code only look for the given part into its internal collection. The extra lock around it is unnecessary.
AddImagePart is already inside a lock statement so you make this right.

@onizet onizet merged commit 3e3ccdd into onizet:dev Oct 13, 2025
3 checks passed
@onizet onizet mentioned this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants