@@ -34,6 +34,23 @@ public class Plugin : IViewer
34
34
private WebpagePanel ? _panel ;
35
35
private string ? _currentHtmlPath ;
36
36
37
+ /// <summary>
38
+ /// Markdown and Markdown-like extensions
39
+ /// It is not guaranteed to support all formats perfectly
40
+ /// </summary>
41
+ private static readonly string [ ] _extensions =
42
+ [
43
+ ".md" , ".markdown" , // The most common Markdown extensions
44
+ ".mdx" , // MDX (Markdown + JSX), used in React ecosystems
45
+ ".mmd" , // MultiMarkdown (MMD), an extended version of Markdown
46
+ ".mkd" , ".mdwn" , ".mdown" , // Early Markdown variants, used by different parsers like Pandoc, Gitit, and Hakyll
47
+ ".mdc" , // A Markdown variant used by Cursor AI [Repeated format from ImageViewer]
48
+ ".qmd" , // Quarto Markdown, developed by RStudio for scientific computing and reproducible reports
49
+ ".rmd" , ".rmarkdown" , // R Markdown, mainly used in RStudio
50
+ ".apib" , // API Blueprint, a Markdown-based format
51
+ ".mdtxt" , ".mdtext" , // Less common
52
+ ] ;
53
+
37
54
private static readonly string _resourcePath = Path . Combine ( SettingHelper . LocalDataPath , "QuickLook.Plugin.MarkdownViewer" ) ;
38
55
private static readonly string _resourcePrefix = "QuickLook.Plugin.MarkdownViewer.Resources." ;
39
56
private static readonly ResourceManager _resourceManager = new ( _resourcePath , _resourcePrefix ) ;
@@ -51,7 +68,7 @@ public void Init()
51
68
52
69
public bool CanHandle ( string path )
53
70
{
54
- return ! Directory . Exists ( path ) && new [ ] { ".md" , ".mdown" , ".rmd" , ".markdown" } . Any ( path . ToLower ( ) . EndsWith ) ;
71
+ return ! Directory . Exists ( path ) && _extensions . Any ( path . ToLower ( ) . EndsWith ) ;
55
72
}
56
73
57
74
public void Prepare ( string path , ContextObject context )
0 commit comments