Merge branch 'develop' into fix-issue-3330

This commit is contained in:
Ran Luo 2023-08-03 22:23:46 +08:00 committed by GitHub
commit b948bdc127
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 709 additions and 629 deletions

View File

@ -1,51 +0,0 @@
'use strict'
const fs = require('fs')
const path = require('path')
const { exec: execNode } = require("child_process")
const util = require('util')
const exec = util.promisify(execNode)
// interface AfterPackContext {
// outDir: string
// appOutDir: string
// packager: PlatformPackager<any>
// electronPlatformName: string
// arch: Arch
// targets: Array<Target>
// }
/**
*
* @param {AfterPackContext} context
*/
const afterPack = async (context) => {
// Workaround to remove debug information from production binaries on Linux (Electron#32669).
if (context.packager.platform.name === 'linux') {
console.log('[afterPack] Removing Electron debug information on Linux')
const { appOutDir } = context
const chromeCrashpadHandlerPath = path.join(appOutDir, 'chrome_crashpad_handler')
const libvkPath = path.join(appOutDir, 'libvk_swiftshader.so')
if (fs.existsSync(chromeCrashpadHandlerPath)) {
const { err } = await exec(`strip "${chromeCrashpadHandlerPath}"`)
if (err) {
console.log('[afterPack] Unable to strip "chrome_crashpad_handler".')
}
} else {
console.log(`[afterPack] "chrome_crashpad_handler" doesn't exists: "${chromeCrashpadHandlerPath}".`)
}
if (fs.existsSync(libvkPath)) {
const { err } = await exec(`strip "${libvkPath}"`)
if (err) {
console.log('[afterPack] Unable to strip "libvk_swiftshader.so".')
}
} else {
console.log(`[afterPack] "libvk_swiftshader.so" doesn't exists: "${libvkPath}".`)
}
}
}
exports.default = afterPack

View File

@ -16,10 +16,6 @@
<br>
<div align="center">
<!-- Version -->
<a href="https://marktext.github.io/website">
<img src="https://badge.fury.io/gh/jocs%2Fmarktext.svg" alt="website">
</a>
<!-- License -->
<a href="LICENSE">
<img src="https://img.shields.io/github/license/marktext/marktext.svg" alt="LICENSE">
@ -47,7 +43,7 @@
<div align="center">
<h3>
<a href="https://marktext.app">
<a href="https://github.com/marktext/marktext">
Website
</a>
<span> | </span>

View File

@ -81,7 +81,7 @@ These entires don't have a settings option and need to be changed manually.
| Key | Type | Default | Description |
| -------------------- | ---------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| searchExclusions | Array of Strings | `[]` | The filename exclusions for the file searcher. Default: `'*.markdown', '*.mdown', '*.mkdn', '*.md', '*.mkd', '*.mdwn', '*.mdtxt', '*.mdtext', '*.text', '*.txt'` |
| searchExclusions | Array of Strings | `[]` | The filename exclusions for the file searcher. Default: `'*.markdown', '*.mdown', '*.mkdn', '*.md', '*.mkd', '*.mdwn', '*.mdtxt', '*.mdtext', '*.mdx', '*.text', '*.txt'` |
| searchMaxFileSize | String | `""` | The maximum file size to search in (e.g. 50K or 10MB). Default: unlimited |
| searchIncludeHidden | Boolean | false | Search hidden files and directories |
| searchNoIgnore | Boolean | false | Don't respect ignore files such as `.gitignore`. |

View File

@ -47,7 +47,7 @@
<div align="center">
<h3>
<a href="https://marktext.app">
<a href="https://github.com/marktext/marktext">
ウェブサイト
</a>
<span> | </span>

View File

@ -1,4 +1,4 @@
<p align="center"><img src="static/logo-small.png" alt="마크 텍스트" width="100" height="100"></p>
<p align="center"><img src="../../static/logo-small.png" alt="마크 텍스트" width="100" height="100"></p>
<h1 align="center">마크 텍스트</h1>
@ -47,7 +47,7 @@
<div align="center">
<h3>
<a href="https://marktext.app">
<a href="https://github.com/marktext/marktext">
웹사이트
</a>
<span> | </span>

View File

@ -47,7 +47,7 @@
<div align="center">
<h3>
<a href="https://marktext.app">
<a href="https://github.com/marktext/marktext">
Site
</a>
<span> | </span>

View File

@ -47,7 +47,7 @@
<div align="center">
<h3>
<a href="https://marktext.app">
<a href="https://github.com/marktext/marktext">
Web sitesi
</a>
<span> | </span>

View File

@ -47,7 +47,7 @@
<div align="center">
<h3>
<a href="https://marktext.app">
<a href="https://github.com/marktext/marktext">
网站
</a>
<span> | </span>

View File

@ -48,7 +48,7 @@
<div align="center">
<h3>
<a href="https://marktext.app">
<a href="https://github.com/marktext/marktext">
官網
</a>
<span> | </span>
@ -112,10 +112,10 @@
<h2 align="center">支援 MarkText</h2>
MarkText 是 MIT 許可的開源專案,你可以持續在 GitHub 發布頁面免費下載最新版本。MarkText 仍然在開發中,其發展與所有贊助商都密不可分。我希望你加入他們的行列:
MarkText 是基於 MIT 授權條款的開源專案,您可以持續在 GitHub 發布頁面免費下載最新版本。MarkText 仍然在開發中,其發展與所有贊助商都密不可分。我希望您加入此行列:
- [Become a backer or sponsor on Patreon](https://www.patreon.com/ranluo) or [One time donation](https://github.com/Jocs/sponsor.me)
- [Become a backer or sponsor on Open Collective](https://opencollective.com/marktext)
- [透過 Patreon 成為支持者或贊助商](https://www.patreon.com/ranluo) 或 [一次性贊助](https://github.com/Jocs/sponsor.me)
- [透過 Open Collective 成為支持者或贊助商](https://opencollective.com/marktext)
##### 使用 Patreon 和 OpenCollective 贊助有什麼不同?
@ -145,13 +145,13 @@ MarkText 是 MIT 許可的開源專案,你可以持續在 GitHub 發布頁面
<img src="https://opencollective.com/marktext/tiers/bronze-sponsors.svg?avatarHeight=36&width=600">
</a>
**維護者**
**支持者**
<a href="https://opencollective.com/marktext#backers">
<img src="https://opencollective.com/marktext/tiers/backer.svg?avatarHeight=36&width=600">
</a>
## 螢幕
## 螢幕
![](../../docs/marktext.png?raw=true)
@ -164,8 +164,9 @@ MarkText 是 MIT 許可的開源專案,你可以持續在 GitHub 發布頁面
- 可以輸出 **HTML****PDF** 文件。
- 各種主題:**Cadmium Light**、**Material Dark** 等等。
- 各種編輯模式:**原始碼模式**、**打字機模式**、**專注模式**。
- 直接從剪貼簿中貼上圖片。
<h4 align="center">:crescent_moon: 主 :high_brightness:</h4>
<h4 align="center">:crescent_moon: 主 :high_brightness:</h4>
| Cadmium Light | Dark |
|:-------------------------------------------------:|:-----------------------------------------------:|
@ -184,10 +185,10 @@ MarkText 是 MIT 許可的開源專案,你可以持續在 GitHub 發布頁面
## 為什麼要另外寫一個編輯器?
1. 我愛寫作。我曾經用過很多 Markdown 編輯器但沒有一個編輯器可以滿足我的需求。我不喜歡在我寫作的時候被莫名其妙的bug干擾。
1. 我愛寫作。我曾經用過很多 Markdown 編輯器,但沒有一個編輯器可以滿足我的需求。我不喜歡在我寫作的時候被莫名其妙的 bug干擾。
**MarkText** 使用 virtual DOM 來呈現畫面,擁有高效能和開源的附加優勢。任何喜歡 Markdown 和寫作的人都可以使用 MarkText。
2. 承上所述,**MarkText** 是完全免費和開源的,且將永遠開源。我們希望所有 Markdown 愛好者都可以協助開發並貢獻自己的程式,讓 **MarkText** 成為流行的 Markdown 編輯器。
3. Markdown 編輯器很多,各有優點,有些則沒有。我們很難滿足所有 Markdown 用户的需求,但是我們希望 **MarkText** 盡可能滿足每一個 Markdown 用户的需求。儘管最新的 **MarkText** 仍不完美,但我們會盡力使它更加完善。
3. Markdown 編輯器很多,各有不同的優點與功能。我們很難滿足所有 Markdown 使用者的需求,但是我們希望 **MarkText** 盡可能滿足每一個 Markdown 使用者的需求。儘管最新的 **MarkText** 仍不完美,但我們會盡力使它更加完善。
## 下載及安裝
@ -201,7 +202,7 @@ MarkText 是 MIT 許可的開源專案,你可以持續在 GitHub 發布頁面
#### macOS
可以從 [release page](https://github.com/marktext/marktext/releases/latest) 下載最新的 `marktext-%version%.dmg` 或是使用 [**homebrew cask**](https://github.com/caskroom/homebrew-cask) 安裝 MarkText。如果使用 Homebrew-Cask您只需要安裝 [Homebrew](https://brew.sh/)。
可以從 [release page](https://github.com/marktext/marktext/releases/latest) 下載最新的 `marktext-%version%.dmg` 或是使用 [**homebrew cask**](https://github.com/caskroom/homebrew-cask) 安裝 MarkText。如果使用 Homebrew-Cask您只需要安裝 [Homebrew](https://brew.sh/)。
```bash
brew install --cask mark-text
@ -209,28 +210,45 @@ brew install --cask mark-text
#### Windows
只需要透過安裝精靈 (`marktext-setup-version.exe`)下載並安裝 MarkText然後選擇替用户或是機器安裝。
只需要透過安裝精靈 (`marktext-setup-version.exe`)下載並安裝 MarkText然後選擇為單一使用者或是所有使用者安裝。
或者可以使用 Chocolatey 或 Winget 等套件管理器來安裝 MarkText。
- 使用 Chocolatey 前需要安裝好 [Chocolatey](https://chocolatey.org/install)。
```bash
choco install marktext
```
- 使用 Winget 前需要安裝好 [Winget](https://docs.microsoft.com/en-us/windows/package-manager/winget/#install-winget)。
```bash
winget install marktext
```
#### Linux
請依照 [Linux installation instructions](../../docs/LINUX.md) 的說明安裝。
請依照 [Linux installation instructions](../../docs/LINUX.md) 的說明進行安裝。
#### 其它
可以從下面網址下載 Linux、macOS 和 Windows 的安裝檔:[release page](https://github.com/marktext/marktext/releases/latest)。如果該版本在你的系统不能使用,請開一個 [issue](https://github.com/marktext/marktext/issues).
可以從下網址下載 Linux、macOS 和 Windows 的安裝檔:[release page](https://github.com/marktext/marktext/releases/latest)。如果該版本在您的系統中無法正常使用,請開一個 [issue](https://github.com/marktext/marktext/issues)。
## 開發
如果您想自己建置 **MarkText**,請查看我們的 [developer documentation](../../.github.md#build-instructions).
如果您想自己建置 **MarkText**,請查看我們的 [build instructions](../../docs/dev/BUILD.md)。
- [使用者說明文件](../../docs/README.md)
- [開發人員說明文件](../../docs/dev/README.md)
如果您對 **MarkText** 有任何疑問,歡迎開一個 issue並使用開 issue 時的預設格式。當然您也可以直接提交 PR我們將感激不盡。
## 整合
- [Alfred Workflow](http://www.packal.org/workflow/mark-text)macOS 應用程式 Alfred 的使用流程:使用 "mt" 在文件或者文件夾中打開 MarkText。
- [Alfred Workflow](http://www.packal.org/workflow/mark-text)macOS 應用程式 Alfred 的使用流程:使用 "mt" 在檔案或者檔案夾中打開 MarkText。
## 貢獻
MarkText 正在全面開發中,請確保在提出 PR 之前先閱讀 [Contributing Guide](../../CONTRIBUTING.md) 想要给 MarkText 新增一些功能嗎?請先看看 [ROADMAP](../../ROADMAP.md) 並創建一個 issue。
MarkText 正在全面開發中,請確保在提出 PR 之前先閱讀 [Contributing Guide](../../CONTRIBUTING.md) 想要為 MarkText 新增一些功能嗎?請先看看 [roadmap](../../ROADMAP.md) 並新增一個 issue。
## 貢獻者
@ -241,8 +259,8 @@ MarkText 正在全面開發中,請確保在提出 PR 之前先閱讀 [Contribu
<a href="https://github.com/marktext/marktext/graphs/contributors"><img src="https://opencollective.com/marktext/contributors.svg?width=890" /></a>
### License
### 授權條款
[**MIT**](../../LICENSE).
[**MIT**](../../LICENSE)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmarktext%2Fmarktext?ref=badge_large)

View File

@ -16,6 +16,8 @@ files:
- "!node_modules/dagre-d3-renderer/dist/demo/"
- "!node_modules/dagre-d3/dist/demo/"
- "!node_modules/dragula/resources"
- "!node_modules/jest-image-snapshot/images/"
- "!node_modules/jest-image-snapshot/jest-image-snapshot.png"
- "!node_modules/**/*.js.map"
- "!node_modules/**/*.cjs.map"
- "!node_modules/**/*.mjs.map"
@ -50,7 +52,6 @@ extraFiles:
- "LICENSE"
- from: "resources/THIRD-PARTY-LICENSES.txt"
to: "THIRD-PARTY-LICENSES.txt"
afterPack: './.electron-vue/electron-builder/afterPack.js'
fileAssociations:
- ext:
@ -60,6 +61,7 @@ fileAssociations:
- "mdown"
- "mdtxt"
- "mdtext"
- "mdx"
name: "Markdown"
description: "Markdown document"
role: "Editor"

View File

@ -1,7 +1,7 @@
{
"name": "marktext",
"version": "0.17.1",
"homepage": "https://marktext.app/",
"homepage": "https://github.com/marktext/marktext/",
"description": "Next generation markdown editor",
"license": "MIT",
"main": "./dist/electron/main.js",
@ -52,32 +52,33 @@
"electron-store": "^8.0.1",
"electron-window-state": "^5.0.3",
"element-resize-detector": "^1.2.4",
"element-ui": "^2.15.7",
"element-ui": "^2.15.8",
"execall": "^2.0.0",
"fast-deep-equal": "^3.1.3",
"flowchart.js": "^1.17.1",
"fontmanager-redux": "^1.1.0",
"fs-extra": "^10.0.1",
"fuzzaldrin": "^2.1.0",
"github-markdown-css": "^3.0.1",
"html-tags": "^3.1.0",
"html-tags": "^3.2.0",
"iconv-lite": "^0.6.3",
"iso-639-1": "^2.1.13",
"joplin-turndown-plugin-gfm": "^1.0.12",
"katex": "^0.15.3",
"keytar": "^7.9.0",
"mermaid": "^8.14.0",
"mermaid": "^9.0.0",
"minizlib": "^2.1.2",
"native-keymap": "^3.3.0",
"plist": "^3.0.4",
"plist": "^3.0.5",
"popper.js": "^1.16.1",
"prismjs": "^1.27.0",
"snabbdom": "^3.3.1",
"snabbdom": "^3.4.0",
"snabbdom-to-html": "^7.0.0",
"source-map-support": "^0.5.21",
"turndown": "^7.1.1",
"underscore": "^1.13.2",
"unsplash-js": "^7.0.15",
"vega": "^5.22.0",
"vega": "^5.22.1",
"vega-embed": "^6.20.8",
"vega-lite": "^5.2.0",
"vscode-ripgrep": "^1.12.1",
@ -88,7 +89,7 @@
"webfontloader": "^1.6.28"
},
"devDependencies": {
"@babel/core": "^7.17.7",
"@babel/core": "^7.17.9",
"@babel/eslint-parser": "^7.17.0",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-export-default-from": "^7.16.7",
@ -98,13 +99,13 @@
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/register": "^7.17.7",
"@babel/runtime": "^7.17.7",
"@babel/runtime": "^7.17.9",
"@markedjs/html-differ": "^3.0.4",
"@playwright/test": "^1.20.0",
"babel-loader": "^8.2.3",
"@playwright/test": "^1.21.0",
"babel-loader": "^8.2.4",
"babel-plugin-component": "^1.1.1",
"babel-plugin-istanbul": "^6.1.1",
"cfonts": "^2.10.0",
"cfonts": "^2.10.1",
"chai": "^4.3.6",
"chalk": "^4.1.2",
"cheerio": "^1.0.0-rc.10",
@ -114,34 +115,34 @@
"del": "^6.0.0",
"devtron": "^1.4.0",
"dotenv": "^16.0.0",
"electron": "^17.1.2",
"electron-builder": "^22.14.13",
"electron": "^18.0.4",
"electron-builder": "^23.0.6",
"electron-devtools-installer": "^3.2.0",
"electron-rebuild": "^3.2.7",
"electron-updater": "^4.6.5",
"eslint": "^8.11.0",
"electron-updater": "^5.0.2",
"eslint": "^8.13.0",
"eslint-config-standard": "^16.0.3",
"eslint-friendly-formatter": "^4.0.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-html": "^6.2.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-vue": "^8.5.0",
"eslint-plugin-vue": "^8.6.0",
"eslint-webpack-plugin": "^3.1.1",
"esm": "^3.2.25",
"file-loader": "^6.2.0",
"git-revision-webpack-plugin": "^5.0.0",
"html-webpack-plugin": "^5.5.0",
"imports-loader": "^0.8.0",
"karma": "^6.3.17",
"karma": "^6.3.18",
"karma-chai": "^0.1.0",
"karma-coverage": "^2.2.0",
"karma-electron": "^7.1.0",
"karma-mocha": "^2.0.1",
"karma-sourcemap-loader": "^0.3.8",
"karma-spec-reporter": "0.0.33",
"karma-spec-reporter": "0.0.34",
"karma-webpack": "^5.0.0",
"license-checker": "^25.0.1",
"listr": "^0.14.3",
@ -151,10 +152,10 @@
"node-fetch": "^2.6.7",
"node-loader": "^2.0.0",
"path-browserify": "^1.0.1",
"playwright": "^1.20.0",
"playwright": "^1.21.0",
"postcss": "^8.4.12",
"postcss-loader": "^6.2.1",
"postcss-preset-env": "^7.4.2",
"postcss-preset-env": "^7.4.3",
"raw-loader": "^4.0.2",
"require-dir": "^1.2.0",
"stacktrace-parser": "^0.1.10",
@ -168,10 +169,10 @@
"vue-loader": "^15.9.8",
"vue-style-loader": "^4.1.3",
"vue-template-compiler": "^2.6.14",
"webpack": "^5.70.0",
"webpack": "^5.72.0",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4",
"webpack-dev-server": "^4.8.1",
"webpack-hot-middleware": "^2.25.1",
"webpack-merge": "^5.8.0"
},

View File

@ -19,7 +19,7 @@
<li>Various edit modes and themes: source code mode, typewriter mode, focus mode</li>
</ul>
</description>
<url type="homepage">https://marktext.app/</url>
<url type="homepage">https://github.com/marktext/marktext/</url>
<url type="bugtracker">https://github.com/marktext/marktext/issues</url>
<screenshots>
<screenshot type="default">

View File

@ -13,6 +13,7 @@ export const MARKDOWN_EXTENSIONS = Object.freeze([
'mdwn',
'mdtxt',
'mdtext',
'mdx',
'text',
'txt'
])

View File

@ -68,7 +68,7 @@ export default function () {
}, {
label: 'Website...',
click () {
shell.openExternal('https://marktext.app')
shell.openExternal('https://github.com/marktext/marktext')
}
}, {
label: 'Watch on GitHub...',

View File

@ -9,6 +9,7 @@ const MARKDOWN_EXTENSIONS = Object.freeze([
'mdwn',
'mdtxt',
'mdtext',
'mdx',
'text',
'txt'
])

View File

@ -1,6 +1,6 @@
import { clipboard, ipcRenderer, shell, webFrame } from 'electron'
import path from 'path'
import equal from 'deep-equal'
import equal from 'fast-deep-equal'
import { isSamePathSync } from 'common/filesystem/paths'
import bus from '../bus'
import { hasKeys, getUniqueId } from '../util'

1152
yarn.lock

File diff suppressed because it is too large Load Diff