1
0
mirror of https://github.com/BoostIo/Boostnote synced 2026-01-07 14:09:21 +00:00

Merge pull request #1993 from ehhc/smart_arrows

Include markdown-it-smartArrow. Toggle it via settings and disable it…
This commit is contained in:
Sosuke Suzuki
2018-06-06 12:13:09 +09:00
committed by GitHub
26 changed files with 62 additions and 18 deletions

View File

@@ -59,6 +59,7 @@ export const DEFAULT_CONFIG = {
scrollPastEnd: false,
smartQuotes: true,
breaks: true,
smartArrows: false,
allowCustomCSS: false,
customCSS: '',
sanitize: 'STRICT' // 'STRICT', 'ALLOW_STYLES', 'NONE'

View File

@@ -100,6 +100,7 @@ class UiTab extends React.Component {
scrollPastEnd: this.refs.previewScrollPastEnd.checked,
smartQuotes: this.refs.previewSmartQuotes.checked,
breaks: this.refs.previewBreaks.checked,
smartArrows: this.refs.previewSmartArrows.checked,
sanitize: this.refs.previewSanitize.value,
allowCustomCSS: this.refs.previewAllowCustomCSS.checked,
customCSS: this.customCSSCM.getCodeMirror().getValue()
@@ -492,6 +493,16 @@ class UiTab extends React.Component {
{i18n.__('Render newlines in Markdown paragraphs as <br>')}
</label>
</div>
<div styleName='group-checkBoxSection'>
<label>
<input onChange={(e) => this.handleUIChange(e)}
checked={this.state.config.preview.smartArrows}
ref='previewSmartArrows'
type='checkbox'
/>&nbsp;
{i18n.__('Convert textual arrows to beautiful signs. ⚠ This will interfere with using HTML comments in your Markdown.')}
</label>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>