assets/includes/fileread.html in jekyll-obsidian-1.1.2 vs assets/includes/fileread.html in jekyll-obsidian-1.1.3
- old
+ new
@@ -1,7 +1,8 @@
<head>
- <script src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
+ <script
+ src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
</head>
<!-- --------------------------- Data Extractors --------------------------- -->
<script>
function extractFilenameFromPath(filePath, removeExtension = true) {
@@ -144,11 +145,10 @@
}
function generateCallouts(calloutsArr, cleanedHTML) {
calloutsArr.forEach(callout => {
- // Extract the callout type including square brackets, removing "> " part
const calloutType = callout.slice(2).trim().toLowerCase();
console.log("calloutType: " + calloutType);
let svgString = '';
switch (calloutType) {
case '[!note]':
@@ -209,12 +209,12 @@
let newHTML = cleanedHTML.innerHTML;
try {
const embedsParsed = JSON.parse(embeds.replace(/"/g, '"'));
embedsArr.forEach(embed => {
const fileNameMatch = embed.match(/\[\[(.*?)\]\]/);
- console.log("fileNameMatch: " + fileNameMatch);
if (fileNameMatch) {
const fileName = extractFilenameFromPath(fileNameMatch[1]);
+ console.log("fileNameMatch: " + fileNameMatch + " embed " + embed);
for (let key in embedsParsed) {
const embedFileName = extractFilenameFromPath(key);
if (embedFileName.replace("/:|", "'") === fileName) {
let encodedFileName =
key.split('/').map(part => encodeURIComponent(part)).join('/');
\ No newline at end of file