Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
reply2za committed Jul 13, 2024
1 parent 42cbd6e commit 76c883e
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions src/ui/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ export async function renderCompactMarkdown(
markdown: string,
container: HTMLElement,
sourcePath: string,
component: Component,
component: Component
) {
let subcontainer = container.createSpan();
await MarkdownRenderer.render(app, markdown, subcontainer, sourcePath, component);
let subcontainer = container.createSpan();
await MarkdownRenderer.render(app, markdown, subcontainer, sourcePath, component);

let paragraph = subcontainer.querySelector(":scope > p");
if (subcontainer.children.length == 1 && paragraph) {
while (paragraph.firstChild) {
subcontainer.appendChild(paragraph.firstChild);
}
subcontainer.removeChild(paragraph);
let paragraph = subcontainer.querySelector(":scope > p");
if (subcontainer.children.length == 1 && paragraph) {
while (paragraph.firstChild) {
subcontainer.appendChild(paragraph.firstChild);
}
subcontainer.removeChild(paragraph);
}
}

/** Render a pre block with an error in it; returns the element to allow for dynamic updating. */
Expand Down Expand Up @@ -62,13 +62,7 @@ export async function renderValue(
}

if (Values.isNull(field)) {
await renderCompactMarkdown(
app,
settings.renderNullAs,
container,
originFile,
component,
);
await renderCompactMarkdown(app, settings.renderNullAs, container, originFile, component);
} else if (Values.isDate(field)) {
container.appendText(renderMinimalDate(field, settings, currentLocale()));
} else if (Values.isDuration(field)) {
Expand Down

0 comments on commit 76c883e

Please sign in to comment.