SWI-Prolog/packages-pengines — pull request #18 by samer-- (2014-12-19 13:45:45+00:00)
Title: Fixed blob to HTML conversion and added rendering hook.

The problem was that term_html:term//3 was producing an assertion failure on line 88 when asked to render a term containing blobs, beause primitive/2 was not catching the blobs.

The changes are self-explanatory, I think -- the only question is which module to declare the blob_rendering//3 hook. I put it in pengines_io because there was already a hook there, but perhaps it should be in term_html.pl so as not to depend on pengines_io.pl. In fact, this version might not work correctly because pengines_io is not imported into term_html, so term_html does not know that pengines_io:blob_rendering//3 is multifile. Thus, if external code declares clauses of blob_rendering//3, they might clash or overwrite each other -- my understanding of multifile predicates leaves me unsure, so please feel free to re-organise the hook predicates as you see fit.