Skip to content

Commit

Permalink
6.2.9
Browse files Browse the repository at this point in the history
- Actually fix #80 (hopefully)
  • Loading branch information
valentine195 committed Aug 22, 2021
1 parent e064e10 commit 133cc5c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
10 changes: 5 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import typescript from "@rollup/plugin-typescript";
import { nodeResolve } from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import css from "rollup-plugin-css-only";
const typescript = require ("@rollup/plugin-typescript");
const { nodeResolve } = require ("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
const css = require ("rollup-plugin-css-only");

const banner = `/*
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP
if you want to view the source visit the plugins github repository
*/
`;

export default {
module.exports = {
input: "./src/main.ts",
output: {
dir: ".",
Expand Down
19 changes: 11 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,16 @@ export default class ObsidianAdmonition
}

if (!TYPE_REGEX.test(el.textContent) && !push) return;
if (
!(
Array.from(el.children).find((e) =>
TYPE_REGEX.test(e.textContent)
) instanceof HTMLParagraphElement
)
)
return;

if (!push) {
if (
!(
Array.from(el.children).find((e) =>
TYPE_REGEX.test(e.textContent)
) instanceof HTMLParagraphElement
)
)
return;
push = true;
let child = new MarkdownRenderChild(el);
id = getID();
Expand Down Expand Up @@ -653,6 +654,7 @@ title:
this.app.workspace.layoutReady
? this.layoutReady()
: this.app.workspace.on(
//@ts-expect-error
"layout-ready",
this.layoutReady.bind(this)
);
Expand All @@ -667,6 +669,7 @@ title:
this.app.workspace.layoutReady
? this.layoutReady()
: this.app.workspace.on(
//@ts-expect-error
"layout-ready",
this.layoutReady.bind(this)
);
Expand Down

0 comments on commit 133cc5c

Please sign in to comment.