From d02ced59f8d4562d16f42c5f482e5848b9a452fa Mon Sep 17 00:00:00 2001 From: "Helmut K. C. Tessarek" Date: Mon, 14 Oct 2019 17:35:54 -0400 Subject: [PATCH 1/2] GitHub: Lock issues that have been closed as stale after 1 day --- .github/lock.yml | 25 +++++++++++++++++++++++++ .github/stale.yml | 3 --- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .github/lock.yml diff --git a/.github/lock.yml b/.github/lock.yml new file mode 100644 index 000000000..6670cafed --- /dev/null +++ b/.github/lock.yml @@ -0,0 +1,25 @@ +# Configuration for Lock Threads - https://github.com/dessant/lock-threads +# Number of days of inactivity before a closed issue or pull request is locked +daysUntilLock: 1 +# Skip issues and pull requests created before a given timestamp. Timestamp must +# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable +skipCreatedBefore: false +# Issues and pull requests with these labels will be ignored. Set to `[]` to disable +exemptLabels: [] +# Label to add before locking, such as `outdated`. Set to `false` to disable +lockLabel: false +# Comment to post before locking. Set to `false` to disable +lockComment: false +# Assign `resolved` as the reason for locking. Set to `false` to disable +setLockReason: false +# Limit to only `issues` or `pulls` +only: issues +# Optionally, specify configuration settings just for `issues` or `pulls` +# issues: +# exemptLabels: +# - help-wanted +# lockLabel: outdated +# pulls: +# daysUntilLock: 30 +# Repository to extend settings from +# _extends: repo diff --git a/.github/stale.yml b/.github/stale.yml index 8b301485c..16fd3cfc6 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -3,9 +3,6 @@ daysUntilStale: 90 # Number of days of inactivity before a stale issue is closed daysUntilClose: 7 -# After x days, lock the issue. -daysUntilLock: 1 -lockComment: false # Issues with these labels will never be considered stale exemptLabels: - "good first issue" From d91b3624e95f63659fb5b20f6e57bc3148bd005d Mon Sep 17 00:00:00 2001 From: "Helmut K. C. Tessarek" Date: Mon, 14 Oct 2019 18:01:58 -0400 Subject: [PATCH 2/2] Desktop, Mobile: Add typographer support (#1987) * add typographer support * add info to readme/markdown.md --- ReactNativeClient/lib/models/Setting.js | 1 + ReactNativeClient/lib/renderers/MdToHtml.js | 2 ++ readme/markdown.md | 1 + 3 files changed, 4 insertions(+) diff --git a/ReactNativeClient/lib/models/Setting.js b/ReactNativeClient/lib/models/Setting.js index 767ba949c..4cdfb7d9e 100644 --- a/ReactNativeClient/lib/models/Setting.js +++ b/ReactNativeClient/lib/models/Setting.js @@ -303,6 +303,7 @@ class Setting extends BaseModel { }, }, 'markdown.softbreaks': { value: false, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable soft breaks') }, + 'markdown.typographer': { value: false, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable typographer support') }, 'markdown.plugin.katex': { value: true, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable math expressions') }, 'markdown.plugin.mark': { value: true, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable ==mark== syntax') }, 'markdown.plugin.footnote': { value: true, type: Setting.TYPE_BOOL, section: 'plugins', public: true, appTypes: ['mobile', 'desktop'], label: () => _('Enable footnotes') }, diff --git a/ReactNativeClient/lib/renderers/MdToHtml.js b/ReactNativeClient/lib/renderers/MdToHtml.js index cdd73717a..c8feb38ea 100644 --- a/ReactNativeClient/lib/renderers/MdToHtml.js +++ b/ReactNativeClient/lib/renderers/MdToHtml.js @@ -60,6 +60,7 @@ class MdToHtml { } const breaks_ = Setting.value('markdown.softbreaks') ? false : true; + const typographer_ = Setting.value('markdown.typographer') ? true : false; const cacheKey = md5(escape(body + JSON.stringify(options) + JSON.stringify(style))); const cachedOutput = this.cachedOutputs_[cacheKey]; @@ -75,6 +76,7 @@ class MdToHtml { const markdownIt = new MarkdownIt({ breaks: breaks_, + typographer: typographer_, linkify: true, html: true, highlight: (str, lang) => { diff --git a/readme/markdown.md b/readme/markdown.md index 4d433dcd4..ca62f5e5c 100644 --- a/readme/markdown.md +++ b/readme/markdown.md @@ -118,6 +118,7 @@ Joplin supports a number of plugins that can be toggled on top the standard Mark | Plugin | Syntax | Description | Enabled | |--------|--------|-------------|---------| +| Typographer | See [typographer](https://markdown-it.github.io/#md3=%7B%22source%22%3A%22%23%20Typographic%20replacements%5Cn%5Cn%28c%29%20%28C%29%20%28r%29%20%28R%29%20%28tm%29%20%28TM%29%20%28p%29%20%28P%29%20%2B-%5Cn%5Cntest..%20test...%20test.....%20test%3F.....%20test!....%5Cn%5Cn!!!!!!%20%3F%3F%3F%3F%20%2C%2C%20%20--%20---%5Cn%5Cn%5C%22Smartypants%2C%20double%20quotes%5C%22%20and%20%27single%20quotes%27%5Cn%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22html%22%7D%7D) markdown-it demo | Does typographic replacements, (c) -> © and so on | no | | [Katex](https://katex.org) | `$$math expr$$` or `$math$` | [See above](#math-notation) | yes | | [Mark](https://github.com/markdown-it/markdown-it-mark) | `==marked==` | Transforms into `marked` (highlighted) | yes | | [Footnote](https://github.com/markdown-it/markdown-it-footnote) | `Simples inline footnote ^[I'm inline!]` | See [plugin page](https://github.com/markdown-it/markdown-it-footnote) for full description | yes |