Merge: nitcatalog: handle local images
authorJean Privat <jean@pryen.org>
Mon, 2 May 2016 23:05:03 +0000 (19:05 -0400)
committerJean Privat <jean@pryen.org>
Mon, 2 May 2016 23:05:03 +0000 (19:05 -0400)
commit8510d14a9f6b88107960d76c8a728c16975514d3
treec2555035bdfa6ab8f70849480c79de9fc43497af
parent9c213bdbdd07b2b41dbf0a3a5503b5cedce96d00
parent86025ea097dd7682c43c5a1191f6561110628d65
Merge: nitcatalog: handle local images

nitcatalog is extended to detect links to local images, copy the resource in the catalog directory and hijack the generated link.
This should fix #2042 and fix the images in http://nitlanguage.org/catalog/p/tinks.html

Most is done by monkey-patching (aka dirty refinement) since the doc_down model uses an internal private global markdown decorator. I'm not sure what should be the best approach here, and I had to improvise since @Morriar is MIA.

Bonus:

* `file_copy_to` is fixed and do not corrupt binary files (thanks @R4PaSs)
* `tests/test_prog` is used to test the catalog

Pull-Request: #2046
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Romain Chanoir <romain.chanoir@viacesi.fr>