BlueGit

timfa 66wiki

better image

timfa Tim · pushed by timfa

Authored 2025-12-20 · 11 months ago

Hash
ae8714864a87fa943d4ca2f697d850312cdfd8b5
Parent
15b57661
2 files changed +3 −3
web/data/chapters/testchapter copy.json +1 −1
@@ -2,7 +2,7 @@
2 2 "type": "chapter",
3 3 "number": 1,
4 4 "title": "Mage Test",
5 "description": "%%66logo.png%%This is a test chapter. It tests to see if the system works.",
5 "description": "[img:66logo.png]This is a test chapter. It tests to see if the system works.",
6 6 "subheaders": [
7 7 {
8 8 "name": "Material",
@@ -2,7 +2,7 @@
2 "type": "chapter",
2 "type": "chapter",
3 "number": 1,
3 "number": 1,
4 "title": "Mage Test",
4 "title": "Mage Test",
5 "description": "%%66logo.png%%This is a test chapter. It tests to see if the system works.",
5 "description": "[img:66logo.png]This is a test chapter. It tests to see if the system works.",
6 "subheaders": [
6 "subheaders": [
7 {
7 {
8 "name": "Material",
8 "name": "Material",
web/templateRenderer.php +2 −2
@@ -177,8 +177,8 @@ final class TemplateRenderer
177 177
178 178 // 5) Escaped images %%path%%
179 179 $template = preg_replace_callback(
180 '/\%\%\s*([a-zA-Z0-9_.-]+)\s*\%\%/',
181 fn($m) => '<div class="inlineImage"><img src="images' . DIRECTORY_SEPARATOR . $m[1] . '"/></div>',
180 '/\[img:\s*([a-zA-Z0-9_\/.\-]+)\s*\]/',
181 fn($m) => '<div class="inlineImage"><img src="images/' . $m[1] . '"/></div>',
182 182 $template
183 183 );
184 184
@@ -177,8 +177,8 @@ final class TemplateRenderer
177
177
178 // 5) Escaped images %%path%%
178 // 5) Escaped images %%path%%
179 $template = preg_replace_callback(
179 $template = preg_replace_callback(
180 '/\%\%\s*([a-zA-Z0-9_.-]+)\s*\%\%/',
180 '/\[img:\s*([a-zA-Z0-9_\/.\-]+)\s*\]/',
181 fn($m) => '<div class="inlineImage"><img src="images' . DIRECTORY_SEPARATOR . $m[1] . '"/></div>',
181 fn($m) => '<div class="inlineImage"><img src="images/' . $m[1] . '"/></div>',
182 $template
182 $template
183 );
183 );
184
184