From 5b6eb504587df592e42690743bce4b41d4066d00 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Sat, 13 Nov 2021 01:32:10 +0100 Subject: Feat: Markdown file previewing (#152) * feat(md): initial support for md-roam * feat(md): link support and more for md * fix(md): add missing remark math package --- components/Sidebar/Note.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'components/Sidebar/Note.tsx') diff --git a/components/Sidebar/Note.tsx b/components/Sidebar/Note.tsx index 197fa76..62cc8ad 100644 --- a/components/Sidebar/Note.tsx +++ b/components/Sidebar/Note.tsx @@ -1,11 +1,12 @@ import React from 'react' import { NodeObject } from 'force-graph' -import { NodeById, NodeByCite, LinksByNodeId } from '../../pages' +import { NodeById, NodeByCite, LinksByNodeId, normalizeLinkEnds } from '../../pages' import { Box, Flex } from '@chakra-ui/react' import { UniOrg } from '../../util/uniorg' import { Backlinks } from '../../components/Sidebar/Backlinks' import { defaultNoteStyle, viewerNoteStyle, outlineNoteStyle } from './noteStyle' +import { OrgRoamLink } from '../../api' export interface NoteProps { setPreviewNode: any @@ -35,6 +36,7 @@ export const Note = (props: NoteProps) => { outline, collapse, } = props + const extraStyle = outline ? outlineNoteStyle : viewerNoteStyle return ( { {...{ setPreviewNode, previewNode, - nodeById, nodeByCite, setSidebarHighlightedNode, openContextMenu, outline, collapse, + nodeById, + linksByNodeId, }} />