| 1999 | // as isSymbolicLink() (never isFile()), so without this stat fallback a |
| 2000 | // note symlinked into the vault is invisible. |
| 2001 | async function isMarkdownNoteEntry(full: string, entry: Dirent): Promise<boolean> { |
| 2002 | if (!entry.name.toLowerCase().endsWith('.md')) return false |
| 2003 | if (entry.isFile()) return true |
| 2004 | if (entry.isSymbolicLink()) { |
| 2005 | try { |
| 2006 | return (await fs.stat(full)).isFile() |
| 2007 | } catch { |
| 2008 | return false |
| 2009 | } |
| 2010 | } |
| 2011 | return false |
| 2012 | } |
| 2013 | |
| 2014 | // `.excalidraw` drawings are listed alongside notes (so they show in the sidebar |
| 2015 | // tree); the sidebar/editor route them by extension to the drawing view. |