Skip to content

Commit

Permalink
Fix formatting & tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksmithgu committed Jun 20, 2024
1 parent cc169a2 commit 7c7fa36
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ui/views/inline-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export async function replaceInlineFields(ctx: MarkdownPostProcessorContext, ini

const context = Object.assign({}, init, { container: box, component: component });
const parseInlineValueWrapper = (fieldVal: string) => {
if (fieldVal.startsWith("<span class=\"math\"")) {
if (fieldVal.startsWith('<span class="math"')) {
// allows math symbols to be rendered in reading view
if (!hasRetrievedText) {
hasRetrievedText = true;
Expand All @@ -75,11 +75,15 @@ export async function replaceInlineFields(ctx: MarkdownPostProcessorContext, ini
} else {
return parseInlineValue(fieldVal);
}
}
};

render(
<DataviewContext.Provider value={context}>
<Lit value={parseInlineValueWrapper(inlineFields[index].value)} inline={true} sourcePath={ctx.sourcePath} />
<Lit
value={parseInlineValueWrapper(inlineFields[index].value)}
inline={true}
sourcePath={ctx.sourcePath}
/>
</DataviewContext.Provider>,
box
);
Expand Down

0 comments on commit 7c7fa36

Please sign in to comment.