diff --git a/client/icons/customIcons.less b/client/icons/customIcons.less
index c288e6eb2..7525d50af 100644
--- a/client/icons/customIcons.less
+++ b/client/icons/customIcons.less
@@ -52,6 +52,12 @@
.book-part-cover {
mask-image: url('../icons/book-part-cover.svg');
}
+.image-wrap-left {
+ content: url('../icons/image-wrap-left.svg');
+}
+.image-wrap-right {
+ content: url('../icons/image-wrap-right.svg');
+}
.davek {
mask-image: url('../icons/Davek.svg');
}
diff --git a/client/icons/image-wrap-left.svg b/client/icons/image-wrap-left.svg
new file mode 100644
index 000000000..fe1024e43
--- /dev/null
+++ b/client/icons/image-wrap-left.svg
@@ -0,0 +1,58 @@
+
+
diff --git a/client/icons/image-wrap-right.svg b/client/icons/image-wrap-right.svg
new file mode 100644
index 000000000..336a20b64
--- /dev/null
+++ b/client/icons/image-wrap-right.svg
@@ -0,0 +1,58 @@
+
+
diff --git a/package-lock.json b/package-lock.json
index 6863e9ece..6c926df8f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,7 +14,7 @@
"@babel/plugin-transform-runtime": "^7.25.4",
"@babel/preset-env": "^7.25.4",
"@babel/preset-react": "^7.24.7",
- "@googleapis/drive": "^8.13.0",
+ "@googleapis/drive": "^8.13.1",
"body-parser": "^1.20.2",
"classnames": "^2.5.1",
"codemirror": "^5.65.6",
@@ -2091,9 +2091,9 @@
}
},
"node_modules/@googleapis/drive": {
- "version": "8.13.0",
- "resolved": "https://registry.npmjs.org/@googleapis/drive/-/drive-8.13.0.tgz",
- "integrity": "sha512-xpXzZeYtNNFLy1m2D5A8/QR2bngpjLPEvO5KZUW4Dlwi/SBHYNTjVm37IQagtQg6QUJlFb4lVLewenUdZZB1rA==",
+ "version": "8.13.1",
+ "resolved": "https://registry.npmjs.org/@googleapis/drive/-/drive-8.13.1.tgz",
+ "integrity": "sha512-ODfl4VUIKNox570DFA6AzAEHQcKI1EQs0xzzupeAIa+S/kFan85TItXU7XywK8mDORnfkgqwXQ5N/u/BFBj5lw==",
"dependencies": {
"googleapis-common": "^7.0.0"
},
diff --git a/package.json b/package.json
index 8c4264f3c..063fc83e9 100644
--- a/package.json
+++ b/package.json
@@ -89,7 +89,7 @@
"@babel/plugin-transform-runtime": "^7.25.4",
"@babel/preset-env": "^7.25.4",
"@babel/preset-react": "^7.24.7",
- "@googleapis/drive": "^8.13.0",
+ "@googleapis/drive": "^8.13.1",
"body-parser": "^1.20.2",
"classnames": "^2.5.1",
"codemirror": "^5.65.6",
diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js
index f5a4b9a58..24b74689f 100644
--- a/shared/naturalcrit/markdown.js
+++ b/shared/naturalcrit/markdown.js
@@ -102,6 +102,20 @@ renderer.link = function (href, title, text) {
return out;
};
+// Expose `src` attribute as `--HB_src` to make the URL accessible via CSS
+renderer.image = function (href, title, text) {
+ href = cleanUrl(href);
+ if (href === null)
+ return text;
+
+ let out = `';
+ return out;
+}
+
// Disable default reflink behavior, as it steps on our variables extension
tokenizer.def = function () {
return undefined;
diff --git a/tests/markdown/mustache-syntax.test.js b/tests/markdown/mustache-syntax.test.js
index 3f7f2529b..51284ef2b 100644
--- a/tests/markdown/mustache-syntax.test.js
+++ b/tests/markdown/mustache-syntax.test.js
@@ -322,9 +322,9 @@ describe('Injection: When an injection tag follows an element', ()=>{
});
it('Renders an image element with injected style', function() {
- const source = '{position:absolute}';
+ const source = '{position:absolute}';
const rendered = Markdown.render(source).trimReturns();
- expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('








An image !
An image !