Skip to content

[th/context-cleanup-2] rework embedding in context

Thomas Haller requested to merge th/context-cleanup-2 into main

I propose here again the two patches from !1072 (merged) and follow-up.

This is of course a matter of opinion, but I think the code is easier to understand. That is, because previously the mime_type argument was overloaded with special types "call" and "link". "call" was only interpreted by NM-ci, while "link" was interpreted by NM-ci (to do minor fixes to the HTML) and also the html-formatter. All other types were passed to the formatter... unless, there was fail_only, which also meant to queue the embed for later. I do now understand the code that was before, but it was more complicated than it should be. There are now also different context.cext.embed_{data,later,link}() calls, so it's clearer what is happening.

One change is that the context._command_calls are no longer merged together as one attachment, instead they are attached individually. TODO: improve the caption="Commands". DONE.

This may (or may not) cause changes for other desktop-ci projects. Later, I would of course send patches to those...

Edited by Thomas Haller

Merge request reports