vault backup: 2026-05-06 17:32:43
This commit is contained in:
5
.obsidian/plugins/image-captions/main.js
vendored
5
.obsidian/plugins/image-captions/main.js
vendored
@@ -108,8 +108,11 @@ var ImageCaptions = class extends import_obsidian2.Plugin {
|
||||
if (this.settings.captionRegex) {
|
||||
try {
|
||||
const match = captionText.match(new RegExp(this.settings.captionRegex));
|
||||
if (match && match[1])
|
||||
if (match && match[1]) {
|
||||
captionText = match[1];
|
||||
} else {
|
||||
captionText = "";
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "image-captions",
|
||||
"name": "Image Captions",
|
||||
"version": "1.1.5",
|
||||
"version": "1.1.7",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Adds captions to images when there is alt-text specified",
|
||||
"author": "Alan Grainger",
|
||||
|
||||
20
.obsidian/plugins/image-captions/styles.css
vendored
20
.obsidian/plugins/image-captions/styles.css
vendored
@@ -13,12 +13,20 @@
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
.theme-dark .image-captions-figure,
|
||||
.theme-dark .image-captions-caption {
|
||||
background: #303030;
|
||||
.image-captions-figure, .image-captions-caption {
|
||||
background: var(--color-base-30);
|
||||
}
|
||||
|
||||
.theme-light .image-captions-figure,
|
||||
.theme-light .image-captions-caption {
|
||||
background: #ebebeb;
|
||||
figure.image-captions-figure:has(img[alt*="|left"]) {
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
figure.image-captions-figure:has(img[alt*="|right"]) {
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
figure.image-captions-figure:has(img[alt*="|center"]) {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user