Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for .qmd files #30

Merged
merged 4 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion AppStore/Listing/Description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Features:

Supported file types:
• Source code (.cpp, .js, .json, .py, .swift, .yml and many more)
• Markdown (.md, .markdown, .mdown, .mkdn, .mkd, .Rmd)
• Markdown (.md, .markdown, .mdown, .mkdn, .mkd, .Rmd, .qmd)
• Archive (.tar, .tar.gz, .zip)
• Jupyter Notebook (.ipynb)
• Tab-separated values (.tab, .tsv)
2 changes: 1 addition & 1 deletion Glance/SupportedFilesWC.xib
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</fragment>
<fragment>
<string key="content">
.md, .markdown, .mdown, .mkdn, .mkd, .Rmd
.md, .markdown, .mdown, .mkdn, .mkd, .Rmd, .qmd

</string>
<attributes>
Expand Down
47 changes: 47 additions & 0 deletions GlanceTests/TestFiles/markdown/example.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: "My Document"
output: html_document
---

# My Document

## Emphasis

This is a Markdown document. It may contain **bold** or _italic_ text. Text can also be **_both bold and italic_**.

## Lists

Markdown supports ordered and unordered lists, which may be nested:

1. Item 1
2. Item 2
- Item 2a
- Item 2b

## Code

This `code` is inline. The following is a code block with syntax highlighting:

```js
const print = (text) => console.log(text);
print("Hello world");
```

## Links

Links can be created explicitly ([example](https://example.com)) or detected automatically (https://example.com).

## Blockquotes

You can easily create quotes:

> This is the quote's first line.
>
> This is the second one.

## Tables

| First header | Second header |
| ------------ | ------------- |
| 1 | 2 |
| 3 | 4 |
1 change: 1 addition & 0 deletions QLPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<string>dyn.ah62d4rv4ge80445er2</string> <!-- .mkdn -->
<string>dyn.ah62d4rv4ge80445er7506</string> <!-- .mkdown -->
<string>dyn.ah62d4rv4ge81e5pe</string> <!-- .Rmd -->
<string>dyn.ah62d4rv4ge81c5pe</string> <!-- .qmd -->
<string>net.daringfireball.markdown</string> <!-- .markdown, .md, .mdown, .mkd, .mkdn -->
<string>net.ia.markdown</string> <!-- .md (used by iA Writer) -->
<string>com.nutstore.down</string> <!-- .md (used by Nutstore) -->
Expand Down
2 changes: 1 addition & 1 deletion QLPlugin/Views/PreviewVCFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PreviewVCFactory {
case "gz":
// `gzip` is only supported for tarballs
return fileURL.path.hasSuffix(".tar.gz") ? TARPreview.self : nil
case "md", "markdown", "mdown", "mkdn", "mkd", "rmd":
case "md", "markdown", "mdown", "mkdn", "mkd", "rmd", "qmd":
return MarkdownPreview.self
case "ipynb":
return JupyterPreview.self
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The installation is slightly complex as the package is not notarized. The steps

<p><img src="./AppStore/Assets/Screenshots/ScreenshotSourceCode.png" alt="" width="600"></p>

- **Markdown** (rendered using [goldmark](https://github.com/yuin/goldmark)): `.md`, `.markdown`, `.mdown`, `.mkdn`, `.mkd`, `.Rmd`
- **Markdown** (rendered using [goldmark](https://github.com/yuin/goldmark)): `.md`, `.markdown`, `.mdown`, `.mkdn`, `.mkd`, `.Rmd`, `.qmd`

<p><img src="./AppStore/Assets/Screenshots/ScreenshotMarkdown.png" alt="" width="600"></p>

Expand Down