Commit 4483ed5d authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Allow static images from any theme to be included in the html export


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 76bd0ee7
......@@ -544,7 +544,7 @@ class HtmlExportOutputFilter {
// Images out of the theme directory
$html = preg_replace_callback(
'#(?<=[\'"])(' . $wwwroot . ')?/?theme/' . get_config('theme') . '/static/images/([a-z0-9_.-]+)#',
'#(?<=[\'"])(' . $wwwroot . ')?/?theme/([a-zA-Z0-9_.-]+)/static/images/([a-z0-9_.-]+)#',
array($this, 'replace_theme_image_link'),
$html
);
......@@ -668,7 +668,7 @@ class HtmlExportOutputFilter {
* Callback
*/
private function replace_theme_image_link($matches) {
$file = '/theme/' . get_config('theme') . '/static/images/' . $matches[2];
$file = '/theme/' . $matches[2] . '/static/images/' . $matches[3];
$this->htmlexportcopyproxy->add(
get_config('docroot') . $file,
'/static/' . $file
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment