mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 04:39:47 +08:00
Fix quick open bug and freeze constants to avoid accidental mutation (#2323)
This commit is contained in:
parent
0e0c72d313
commit
de30d1e3fc
@ -1,4 +1,4 @@
|
|||||||
export const ENCODING_NAME_MAP = {
|
export const ENCODING_NAME_MAP = Object.freeze({
|
||||||
utf8: 'UTF-8',
|
utf8: 'UTF-8',
|
||||||
utf16be: 'UTF-16 BE',
|
utf16be: 'UTF-16 BE',
|
||||||
utf16le: 'UTF-16 LE',
|
utf16le: 'UTF-16 LE',
|
||||||
@ -35,7 +35,7 @@ export const ENCODING_NAME_MAP = {
|
|||||||
eucjp: 'Japanese (EUC-JP)',
|
eucjp: 'Japanese (EUC-JP)',
|
||||||
euckr: 'Korean (EUC-KR)',
|
euckr: 'Korean (EUC-KR)',
|
||||||
latin6: 'Nordic (ISO 8859-10)'
|
latin6: 'Nordic (ISO 8859-10)'
|
||||||
}
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to translate the encoding.
|
* Try to translate the encoding.
|
||||||
|
@ -2,7 +2,7 @@ import fs from 'fs-extra'
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { isFile, isSymbolicLink } from './index'
|
import { isFile, isSymbolicLink } from './index'
|
||||||
|
|
||||||
export const MARKDOWN_EXTENSIONS = [
|
export const MARKDOWN_EXTENSIONS = Object.freeze([
|
||||||
'markdown',
|
'markdown',
|
||||||
'mdown',
|
'mdown',
|
||||||
'mkdn',
|
'mkdn',
|
||||||
@ -13,18 +13,18 @@ export const MARKDOWN_EXTENSIONS = [
|
|||||||
'mdtext',
|
'mdtext',
|
||||||
'text',
|
'text',
|
||||||
'txt'
|
'txt'
|
||||||
]
|
])
|
||||||
|
|
||||||
export const MARKDOWN_INCLUSIONS = MARKDOWN_EXTENSIONS.map(x => '*.' + x)
|
export const MARKDOWN_INCLUSIONS = Object.freeze(MARKDOWN_EXTENSIONS.map(x => '*.' + x))
|
||||||
|
|
||||||
export const IMAGE_EXTENSIONS = [
|
export const IMAGE_EXTENSIONS = Object.freeze([
|
||||||
'jpeg',
|
'jpeg',
|
||||||
'jpg',
|
'jpg',
|
||||||
'png',
|
'png',
|
||||||
'gif',
|
'gif',
|
||||||
'svg',
|
'svg',
|
||||||
'webp'
|
'webp'
|
||||||
]
|
])
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the filename matches one of the markdown extensions.
|
* Returns true if the filename matches one of the markdown extensions.
|
||||||
|
@ -2,7 +2,7 @@ export const isOsx = process.platform === 'darwin'
|
|||||||
export const isWindows = process.platform === 'win32'
|
export const isWindows = process.platform === 'win32'
|
||||||
export const isLinux = process.platform === 'linux'
|
export const isLinux = process.platform === 'linux'
|
||||||
|
|
||||||
export const editorWinOptions = {
|
export const editorWinOptions = Object.freeze({
|
||||||
minWidth: 550,
|
minWidth: 550,
|
||||||
minHeight: 350,
|
minHeight: 350,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
@ -14,9 +14,9 @@ export const editorWinOptions = {
|
|||||||
frame: false,
|
frame: false,
|
||||||
titleBarStyle: 'hiddenInset',
|
titleBarStyle: 'hiddenInset',
|
||||||
zoomFactor: 1.0
|
zoomFactor: 1.0
|
||||||
}
|
})
|
||||||
|
|
||||||
export const preferencesWinOptions = {
|
export const preferencesWinOptions = Object.freeze({
|
||||||
width: 950,
|
width: 950,
|
||||||
height: 650,
|
height: 650,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
@ -34,9 +34,9 @@ export const preferencesWinOptions = {
|
|||||||
thickFrame: !isOsx,
|
thickFrame: !isOsx,
|
||||||
titleBarStyle: 'hiddenInset',
|
titleBarStyle: 'hiddenInset',
|
||||||
zoomFactor: 1.0
|
zoomFactor: 1.0
|
||||||
}
|
})
|
||||||
|
|
||||||
export const PANDOC_EXTENSIONS = [
|
export const PANDOC_EXTENSIONS = Object.freeze([
|
||||||
'html',
|
'html',
|
||||||
'docx',
|
'docx',
|
||||||
'odt',
|
'odt',
|
||||||
@ -51,16 +51,16 @@ export const PANDOC_EXTENSIONS = [
|
|||||||
'textile',
|
'textile',
|
||||||
'opml',
|
'opml',
|
||||||
'epub'
|
'epub'
|
||||||
]
|
])
|
||||||
|
|
||||||
export const BLACK_LIST = [
|
export const BLACK_LIST = Object.freeze([
|
||||||
'$RECYCLE.BIN'
|
'$RECYCLE.BIN'
|
||||||
]
|
])
|
||||||
|
|
||||||
export const EXTENSION_HASN = {
|
export const EXTENSION_HASN = Object.freeze({
|
||||||
styledHtml: '.html',
|
styledHtml: '.html',
|
||||||
pdf: '.pdf'
|
pdf: '.pdf'
|
||||||
}
|
})
|
||||||
|
|
||||||
export const TITLE_BAR_HEIGHT = isOsx ? 21 : 32
|
export const TITLE_BAR_HEIGHT = isOsx ? 21 : 32
|
||||||
export const LINE_ENDING_REG = /(?:\r\n|\n)/g
|
export const LINE_ENDING_REG = /(?:\r\n|\n)/g
|
||||||
|
@ -7,32 +7,32 @@ import voidHtmlTags from 'html-tags/void'
|
|||||||
export const DEVICE_MEMORY = navigator.deviceMemory || 4 // Get the divice memory number(Chrome >= 63)
|
export const DEVICE_MEMORY = navigator.deviceMemory || 4 // Get the divice memory number(Chrome >= 63)
|
||||||
export const UNDO_DEPTH = DEVICE_MEMORY >= 4 ? 100 : 50
|
export const UNDO_DEPTH = DEVICE_MEMORY >= 4 ? 100 : 50
|
||||||
export const HAS_TEXT_BLOCK_REG = /^span$/i
|
export const HAS_TEXT_BLOCK_REG = /^span$/i
|
||||||
export const VOID_HTML_TAGS = voidHtmlTags
|
export const VOID_HTML_TAGS = Object.freeze(voidHtmlTags)
|
||||||
export const HTML_TAGS = htmlTags
|
export const HTML_TAGS = Object.freeze(htmlTags)
|
||||||
// TYPE1 ~ TYPE7 according to https://github.github.com/gfm/#html-blocks
|
// TYPE1 ~ TYPE7 according to https://github.github.com/gfm/#html-blocks
|
||||||
export const BLOCK_TYPE1 = [
|
export const BLOCK_TYPE1 = Object.freeze([
|
||||||
'script', 'pre', 'style'
|
'script', 'pre', 'style'
|
||||||
]
|
])
|
||||||
|
|
||||||
export const BLOCK_TYPE2_REG = /^<!--(?=\s).*\s+-->$/
|
export const BLOCK_TYPE2_REG = /^<!--(?=\s).*\s+-->$/
|
||||||
|
|
||||||
export const BLOCK_TYPE6 = [
|
export const BLOCK_TYPE6 = Object.freeze([
|
||||||
'address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd',
|
'address', 'article', 'aside', 'base', 'basefont', 'blockquote', 'body', 'caption', 'center', 'col', 'colgroup', 'dd',
|
||||||
'details', 'dialog', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset',
|
'details', 'dialog', 'dir', 'div', 'dl', 'dt', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset',
|
||||||
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'iframe', 'legend', 'li', 'link', 'main', 'menu',
|
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'iframe', 'legend', 'li', 'link', 'main', 'menu',
|
||||||
'menuitem', 'meta', 'nav', 'noframes', 'ol', 'optgroup', 'option', 'p', 'param', 'section', 'source', 'summary', 'table',
|
'menuitem', 'meta', 'nav', 'noframes', 'ol', 'optgroup', 'option', 'p', 'param', 'section', 'source', 'summary', 'table',
|
||||||
'tbody', 'td', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul'
|
'tbody', 'td', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul'
|
||||||
]
|
])
|
||||||
|
|
||||||
export const BLOCK_TYPE7 = htmlTags.filter(tag => {
|
export const BLOCK_TYPE7 = Object.freeze(htmlTags.filter(tag => {
|
||||||
return !BLOCK_TYPE1.find(t => t === tag) && !BLOCK_TYPE6.find(t => t === tag)
|
return !BLOCK_TYPE1.find(t => t === tag) && !BLOCK_TYPE6.find(t => t === tag)
|
||||||
})
|
}))
|
||||||
|
|
||||||
export const IMAGE_EXT_REG = /\.(?:jpeg|jpg|png|gif|svg|webp)(?=\?|$)/i
|
export const IMAGE_EXT_REG = /\.(?:jpeg|jpg|png|gif|svg|webp)(?=\?|$)/i
|
||||||
|
|
||||||
export const PARAGRAPH_TYPES = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'pre', 'ul', 'ol', 'li', 'figure']
|
export const PARAGRAPH_TYPES = Object.freeze(['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'pre', 'ul', 'ol', 'li', 'figure'])
|
||||||
|
|
||||||
export const blockContainerElementNames = [
|
export const blockContainerElementNames = Object.freeze([
|
||||||
// elements our editor generates
|
// elements our editor generates
|
||||||
...PARAGRAPH_TYPES,
|
...PARAGRAPH_TYPES,
|
||||||
// all other known block elements
|
// all other known block elements
|
||||||
@ -40,11 +40,11 @@ export const blockContainerElementNames = [
|
|||||||
'figcaption', 'footer', 'form', 'header', 'hgroup', 'main', 'nav',
|
'figcaption', 'footer', 'form', 'header', 'hgroup', 'main', 'nav',
|
||||||
'noscript', 'output', 'section', 'video',
|
'noscript', 'output', 'section', 'video',
|
||||||
'table', 'thead', 'tbody', 'tfoot', 'tr', 'th', 'td'
|
'table', 'thead', 'tbody', 'tfoot', 'tr', 'th', 'td'
|
||||||
]
|
])
|
||||||
|
|
||||||
export const emptyElementNames = ['br', 'col', 'colgroup', 'hr', 'img', 'input', 'source', 'wbr']
|
export const emptyElementNames = Object.freeze(['br', 'col', 'colgroup', 'hr', 'img', 'input', 'source', 'wbr'])
|
||||||
|
|
||||||
export const EVENT_KEYS = generateKeyHash([
|
export const EVENT_KEYS = Object.freeze(generateKeyHash([
|
||||||
'Enter',
|
'Enter',
|
||||||
'Backspace',
|
'Backspace',
|
||||||
'Space',
|
'Space',
|
||||||
@ -55,13 +55,13 @@ export const EVENT_KEYS = generateKeyHash([
|
|||||||
'ArrowRight',
|
'ArrowRight',
|
||||||
'Tab',
|
'Tab',
|
||||||
'Escape'
|
'Escape'
|
||||||
])
|
]))
|
||||||
|
|
||||||
export const LOWERCASE_TAGS = generateKeyHash([
|
export const LOWERCASE_TAGS = Object.freeze(generateKeyHash([
|
||||||
...blockContainerElementNames, ...emptyElementNames, 'div'
|
...blockContainerElementNames, ...emptyElementNames, 'div'
|
||||||
])
|
]))
|
||||||
|
|
||||||
export const CLASS_OR_ID = genUpper2LowerKeyHash([
|
export const CLASS_OR_ID = Object.freeze(genUpper2LowerKeyHash([
|
||||||
'AG_ACTIVE',
|
'AG_ACTIVE',
|
||||||
'AG_AUTO_LINK',
|
'AG_AUTO_LINK',
|
||||||
'AG_AUTO_LINK_EXTENSION',
|
'AG_AUTO_LINK_EXTENSION',
|
||||||
@ -154,20 +154,20 @@ export const CLASS_OR_ID = genUpper2LowerKeyHash([
|
|||||||
'AG_TOOL_BAR',
|
'AG_TOOL_BAR',
|
||||||
'AG_VEGA_LITE',
|
'AG_VEGA_LITE',
|
||||||
'AG_WARN'
|
'AG_WARN'
|
||||||
])
|
]))
|
||||||
|
|
||||||
export const DAED_REMOVE_SELECTOR = new Set([
|
export const DAED_REMOVE_SELECTOR = Object.freeze(new Set([
|
||||||
'.ag-image-marked-text::before',
|
'.ag-image-marked-text::before',
|
||||||
'.ag-image-marked-text.ag-image-fail::before',
|
'.ag-image-marked-text.ag-image-fail::before',
|
||||||
'.ag-hide',
|
'.ag-hide',
|
||||||
'.ag-gray',
|
'.ag-gray',
|
||||||
'.ag-warn'
|
'.ag-warn'
|
||||||
])
|
]))
|
||||||
|
|
||||||
export const CURSOR_ANCHOR_DNA = getLongUniqueId()
|
export const CURSOR_ANCHOR_DNA = getLongUniqueId()
|
||||||
export const CURSOR_FOCUS_DNA = getLongUniqueId()
|
export const CURSOR_FOCUS_DNA = getLongUniqueId()
|
||||||
|
|
||||||
export const DEFAULT_TURNDOWN_CONFIG = {
|
export const DEFAULT_TURNDOWN_CONFIG = Object.freeze({
|
||||||
headingStyle: 'atx', // setext or atx
|
headingStyle: 'atx', // setext or atx
|
||||||
hr: '---',
|
hr: '---',
|
||||||
bulletListMarker: '-', // -, +, or *
|
bulletListMarker: '-', // -, +, or *
|
||||||
@ -188,9 +188,9 @@ export const DEFAULT_TURNDOWN_CONFIG = {
|
|||||||
return node.isBlock ? '\n\n' : ''
|
return node.isBlock ? '\n\n' : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const FORMAT_MARKER_MAP = {
|
export const FORMAT_MARKER_MAP = Object.freeze({
|
||||||
em: '*',
|
em: '*',
|
||||||
inline_code: '`',
|
inline_code: '`',
|
||||||
strong: '**',
|
strong: '**',
|
||||||
@ -212,13 +212,13 @@ export const FORMAT_MARKER_MAP = {
|
|||||||
open: '<mark>',
|
open: '<mark>',
|
||||||
close: '</mark>'
|
close: '</mark>'
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const FORMAT_TYPES = ['strong', 'em', 'del', 'inline_code', 'link', 'image', 'inline_math']
|
export const FORMAT_TYPES = Object.freeze(['strong', 'em', 'del', 'inline_code', 'link', 'image', 'inline_math'])
|
||||||
|
|
||||||
export const LINE_BREAK = '\n'
|
export const LINE_BREAK = '\n'
|
||||||
|
|
||||||
export const PREVIEW_DOMPURIFY_CONFIG = {
|
export const PREVIEW_DOMPURIFY_CONFIG = Object.freeze({
|
||||||
// do not forbit `class` because `code` element use class to present language
|
// do not forbit `class` because `code` element use class to present language
|
||||||
FORBID_ATTR: ['style', 'contenteditable'],
|
FORBID_ATTR: ['style', 'contenteditable'],
|
||||||
ALLOW_DATA_ATTR: false,
|
ALLOW_DATA_ATTR: false,
|
||||||
@ -228,9 +228,9 @@ export const PREVIEW_DOMPURIFY_CONFIG = {
|
|||||||
svgFilters: true,
|
svgFilters: true,
|
||||||
mathMl: true
|
mathMl: true
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const EXPORT_DOMPURIFY_CONFIG = {
|
export const EXPORT_DOMPURIFY_CONFIG = Object.freeze({
|
||||||
FORBID_ATTR: ['contenteditable'],
|
FORBID_ATTR: ['contenteditable'],
|
||||||
ALLOW_DATA_ATTR: false,
|
ALLOW_DATA_ATTR: false,
|
||||||
ADD_ATTR: ['data-align'],
|
ADD_ATTR: ['data-align'],
|
||||||
@ -242,9 +242,9 @@ export const EXPORT_DOMPURIFY_CONFIG = {
|
|||||||
},
|
},
|
||||||
// Allow "file" protocol to export images on Windows (#1997).
|
// Allow "file" protocol to export images on Windows (#1997).
|
||||||
ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
ALLOWED_URI_REGEXP: /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
||||||
}
|
})
|
||||||
|
|
||||||
export const MUYA_DEFAULT_OPTION = {
|
export const MUYA_DEFAULT_OPTION = Object.freeze({
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
lineHeight: 1.6,
|
lineHeight: 1.6,
|
||||||
focusMode: false,
|
focusMode: false,
|
||||||
@ -284,11 +284,11 @@ export const MUYA_DEFAULT_OPTION = {
|
|||||||
superSubScript: false,
|
superSubScript: false,
|
||||||
footnote: false,
|
footnote: false,
|
||||||
isGitlabCompatibilityEnabled: false
|
isGitlabCompatibilityEnabled: false
|
||||||
}
|
})
|
||||||
|
|
||||||
// export const DIAGRAM_TEMPLATE = {
|
// export const DIAGRAM_TEMPLATE = Object.freeze({
|
||||||
// 'mermaid': `graph LR;\nYou-->|Mark Text|Me;`
|
// 'mermaid': `graph LR;\nYou-->|Mark Text|Me;`
|
||||||
// }
|
// })
|
||||||
|
|
||||||
export const isOsx = window && window.navigator && /Mac/.test(window.navigator.platform)
|
export const isOsx = window && window.navigator && /Mac/.test(window.navigator.platform)
|
||||||
export const isWin = window && window.navigator.userAgent && /win32|wow32|win64|wow64/i.test(window.navigator.userAgent)
|
export const isWin = window && window.navigator.userAgent && /win32|wow32|win64|wow64/i.test(window.navigator.userAgent)
|
||||||
@ -299,10 +299,10 @@ export const DATA_URL_REG = /^data:image\/[\w+-]+(;[\w-]+=[\w-]+|;base64)*,[a-zA
|
|||||||
// The smallest transparent gif base64 image.
|
// The smallest transparent gif base64 image.
|
||||||
// export const SMALLEST_BASE64 = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
|
// export const SMALLEST_BASE64 = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
|
||||||
// export const isIOS = /(?:iPhone|iPad|iPod|iOS)/i.test(window.navigator.userAgent)
|
// export const isIOS = /(?:iPhone|iPad|iPod|iOS)/i.test(window.navigator.userAgent)
|
||||||
export const defaultSearchOption = {
|
export const defaultSearchOption = Object.freeze({
|
||||||
isCaseSensitive: false,
|
isCaseSensitive: false,
|
||||||
isWholeWord: false,
|
isWholeWord: false,
|
||||||
isRegexp: false,
|
isRegexp: false,
|
||||||
selectHighlight: false,
|
selectHighlight: false,
|
||||||
highlightIndex: -1
|
highlightIndex: -1
|
||||||
}
|
})
|
||||||
|
@ -83,7 +83,7 @@ class ContentState {
|
|||||||
this.prevCursor = null
|
this.prevCursor = null
|
||||||
this.historyTimer = null
|
this.historyTimer = null
|
||||||
this.history = new History(this)
|
this.history = new History(this)
|
||||||
this.turndownConfig = Object.assign(DEFAULT_TURNDOWN_CONFIG, { bulletListMarker })
|
this.turndownConfig = Object.assign({}, DEFAULT_TURNDOWN_CONFIG, { bulletListMarker })
|
||||||
// table drag bar
|
// table drag bar
|
||||||
this.dragInfo = null
|
this.dragInfo = null
|
||||||
this.isDragTableBar = false
|
this.isDragTableBar = false
|
||||||
|
@ -7,7 +7,7 @@ import AlignRightIcon from '../../../assets/pngicon/algin_right/2.png'
|
|||||||
import AlignCenterIcon from '../../../assets/pngicon/algin_center/2.png'
|
import AlignCenterIcon from '../../../assets/pngicon/algin_center/2.png'
|
||||||
import DeleteIcon from '../../../assets/pngicon/table_delete/2.png'
|
import DeleteIcon from '../../../assets/pngicon/table_delete/2.png'
|
||||||
|
|
||||||
export const TABLE_TOOLS = [{
|
export const TABLE_TOOLS = Object.freeze([{
|
||||||
label: 'table',
|
label: 'table',
|
||||||
title: 'Resize Table',
|
title: 'Resize Table',
|
||||||
icon: TableIcon
|
icon: TableIcon
|
||||||
@ -27,7 +27,7 @@ export const TABLE_TOOLS = [{
|
|||||||
label: 'delete',
|
label: 'delete',
|
||||||
title: 'Delete Table',
|
title: 'Delete Table',
|
||||||
icon: DeleteIcon
|
icon: DeleteIcon
|
||||||
}]
|
}])
|
||||||
|
|
||||||
const renderToolBar = (type, tools, activeBlocks) => {
|
const renderToolBar = (type, tools, activeBlocks) => {
|
||||||
const children = tools.map(tool => {
|
const children = tools.map(tool => {
|
||||||
|
@ -4,38 +4,38 @@
|
|||||||
export const PUNCTUATION_REG = new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/)
|
export const PUNCTUATION_REG = new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/)
|
||||||
/* eslint-enable no-useless-escape */
|
/* eslint-enable no-useless-escape */
|
||||||
// selected from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
// selected from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
||||||
export const WHITELIST_ATTRIBUTES = [
|
export const WHITELIST_ATTRIBUTES = Object.freeze([
|
||||||
'align', 'alt', 'checked', 'class', 'color', 'dir', 'disabled', 'for', 'height', 'hidden',
|
'align', 'alt', 'checked', 'class', 'color', 'dir', 'disabled', 'for', 'height', 'hidden',
|
||||||
'href', 'id', 'lang', 'lazyload', 'rel', 'spellcheck', 'src', 'srcset', 'start', 'style',
|
'href', 'id', 'lang', 'lazyload', 'rel', 'spellcheck', 'src', 'srcset', 'start', 'style',
|
||||||
'target', 'title', 'type', 'value', 'width',
|
'target', 'title', 'type', 'value', 'width',
|
||||||
// Used in img
|
// Used in img
|
||||||
'data-align'
|
'data-align'
|
||||||
]
|
])
|
||||||
|
|
||||||
// export const unicodeZsCategory = [
|
// export const unicodeZsCategory = Object.freeze([
|
||||||
// '\u0020', '\u00A0', '\u1680', '\u2000', '\u2001', '\u2001',
|
// '\u0020', '\u00A0', '\u1680', '\u2000', '\u2001', '\u2001',
|
||||||
// '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007',
|
// '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', '\u2007',
|
||||||
// '\u2008', '\u2009', '\u200A', '\u202F', '\u205F', '\u3000'
|
// '\u2008', '\u2009', '\u200A', '\u202F', '\u205F', '\u3000'
|
||||||
// ]
|
// ])
|
||||||
|
|
||||||
// export const space = ['\u0020'] // space
|
// export const space = ['\u0020'] // space
|
||||||
|
|
||||||
// export const whitespaceCharacter = [
|
// export const whitespaceCharacter = Object.freeze([
|
||||||
// ...space, // space
|
// ...space, // space
|
||||||
// '\u0009', // tab
|
// '\u0009', // tab
|
||||||
// '\u000A', // newline
|
// '\u000A', // newline
|
||||||
// '\u000B', // tabulation
|
// '\u000B', // tabulation
|
||||||
// '\u000C', // form feed
|
// '\u000C', // form feed
|
||||||
// '\u000D' // carriage return
|
// '\u000D' // carriage return
|
||||||
// ]
|
// ])
|
||||||
|
|
||||||
// export const unicodeWhitespaceCharacter = [
|
// export const unicodeWhitespaceCharacter = Object.freeze([
|
||||||
// ...unicodeZsCategory,
|
// ...unicodeZsCategory,
|
||||||
// '\u0009', // tab
|
// '\u0009', // tab
|
||||||
// '\u000D', // carriage return
|
// '\u000D', // carriage return
|
||||||
// '\u000A', // newline
|
// '\u000A', // newline
|
||||||
// '\u000C' // form feed
|
// '\u000C' // form feed
|
||||||
// ]
|
// ])
|
||||||
|
|
||||||
const UNICODE_WHITESPACE_REG = /^\s/
|
const UNICODE_WHITESPACE_REG = /^\s/
|
||||||
|
|
||||||
|
@ -177,9 +177,9 @@ class QuickOpenCommand {
|
|||||||
return [`*${query}`]
|
return [`*${query}`]
|
||||||
}
|
}
|
||||||
|
|
||||||
const inclusions = MARKDOWN_INCLUSIONS
|
const inclusions = []
|
||||||
for (let i = 0; i < inclusions.length; ++i) {
|
for (let i = 0; i < MARKDOWN_INCLUSIONS.length; ++i) {
|
||||||
inclusions[i] = `*${query}` + inclusions[i]
|
inclusions[i] = `*${query}` + MARKDOWN_INCLUSIONS[i]
|
||||||
}
|
}
|
||||||
return inclusions
|
return inclusions
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,12 @@ export const COMMON_STYLE_ID = 'ag-common-style'
|
|||||||
|
|
||||||
export const DEFAULT_EDITOR_FONT_FAMILY = '"Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif, Segoe UI Emoji, Apple Color Emoji, "Noto Color Emoji"'
|
export const DEFAULT_EDITOR_FONT_FAMILY = '"Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif, Segoe UI Emoji, Apple Color Emoji, "Noto Color Emoji"'
|
||||||
export const DEFAULT_CODE_FONT_FAMILY = '"DejaVu Sans Mono", "Source Code Pro", "Droid Sans Mono", monospace'
|
export const DEFAULT_CODE_FONT_FAMILY = '"DejaVu Sans Mono", "Source Code Pro", "Droid Sans Mono", monospace'
|
||||||
export const DEFAULT_STYLE = {
|
export const DEFAULT_STYLE = Object.freeze({
|
||||||
codeFontFamily: DEFAULT_CODE_FONT_FAMILY,
|
codeFontFamily: DEFAULT_CODE_FONT_FAMILY,
|
||||||
codeFontSize: '14px',
|
codeFontSize: '14px',
|
||||||
hideScrollbar: false,
|
hideScrollbar: false,
|
||||||
theme: 'light'
|
theme: 'light'
|
||||||
}
|
})
|
||||||
|
|
||||||
export const railscastsThemes = ['dark', 'material-dark']
|
export const railscastsThemes = Object.freeze(['dark', 'material-dark'])
|
||||||
export const oneDarkThemes = ['one-dark']
|
export const oneDarkThemes = Object.freeze(['one-dark'])
|
||||||
|
@ -1,63 +1,63 @@
|
|||||||
import * as contextMenu from './actions'
|
import * as contextMenu from './actions'
|
||||||
|
|
||||||
export const CUT = {
|
export const CUT = Object.freeze({
|
||||||
label: 'Cut',
|
label: 'Cut',
|
||||||
id: 'cutMenuItem', // not used yet!
|
id: 'cutMenuItem', // not used yet!
|
||||||
role: 'cut'
|
role: 'cut'
|
||||||
}
|
})
|
||||||
|
|
||||||
export const COPY = {
|
export const COPY = Object.freeze({
|
||||||
label: 'Copy',
|
label: 'Copy',
|
||||||
id: 'copyMenuItem',
|
id: 'copyMenuItem',
|
||||||
role: 'copy'
|
role: 'copy'
|
||||||
}
|
})
|
||||||
|
|
||||||
export const PASTE = {
|
export const PASTE = Object.freeze({
|
||||||
label: 'Paste',
|
label: 'Paste',
|
||||||
id: 'pasteMenuItem',
|
id: 'pasteMenuItem',
|
||||||
role: 'paste'
|
role: 'paste'
|
||||||
}
|
})
|
||||||
|
|
||||||
export const COPY_AS_MARKDOWN = {
|
export const COPY_AS_MARKDOWN = Object.freeze({
|
||||||
label: 'Copy As Markdown',
|
label: 'Copy As Markdown',
|
||||||
id: 'copyAsMarkdownMenuItem',
|
id: 'copyAsMarkdownMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.copyAsMarkdown()
|
contextMenu.copyAsMarkdown()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const COPY_AS_HTML = {
|
export const COPY_AS_HTML = Object.freeze({
|
||||||
label: 'Copy As Html',
|
label: 'Copy As Html',
|
||||||
id: 'copyAsHtmlMenuItem',
|
id: 'copyAsHtmlMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.copyAsHtml()
|
contextMenu.copyAsHtml()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const PASTE_AS_PLAIN_TEXT = {
|
export const PASTE_AS_PLAIN_TEXT = Object.freeze({
|
||||||
label: 'Paste as Plain Text',
|
label: 'Paste as Plain Text',
|
||||||
id: 'pasteAsPlainTextMenuItem',
|
id: 'pasteAsPlainTextMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.pasteAsPlainText()
|
contextMenu.pasteAsPlainText()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const INSERT_BEFORE = {
|
export const INSERT_BEFORE = Object.freeze({
|
||||||
label: 'Insert Paragraph Before',
|
label: 'Insert Paragraph Before',
|
||||||
id: 'insertParagraphBeforeMenuItem',
|
id: 'insertParagraphBeforeMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.insertParagraph('before')
|
contextMenu.insertParagraph('before')
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const INSERT_AFTER = {
|
export const INSERT_AFTER = Object.freeze({
|
||||||
label: 'Insert Paragraph After',
|
label: 'Insert Paragraph After',
|
||||||
id: 'insertParagraphAfterMenuItem',
|
id: 'insertParagraphAfterMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.insertParagraph('after')
|
contextMenu.insertParagraph('after')
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const SEPARATOR = {
|
export const SEPARATOR = Object.freeze({
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
}
|
})
|
||||||
|
@ -1,69 +1,69 @@
|
|||||||
import * as contextMenu from './actions'
|
import * as contextMenu from './actions'
|
||||||
|
|
||||||
export const SEPARATOR = {
|
export const SEPARATOR = Object.freeze({
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
}
|
})
|
||||||
|
|
||||||
export const NEW_FILE = {
|
export const NEW_FILE = Object.freeze({
|
||||||
label: 'New File',
|
label: 'New File',
|
||||||
id: 'newFileMenuItem',
|
id: 'newFileMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.newFile()
|
contextMenu.newFile()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const NEW_DIRECTORY = {
|
export const NEW_DIRECTORY = Object.freeze({
|
||||||
label: 'New Directory',
|
label: 'New Directory',
|
||||||
id: 'newDirectoryMenuItem',
|
id: 'newDirectoryMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.newDirectory()
|
contextMenu.newDirectory()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const COPY = {
|
export const COPY = Object.freeze({
|
||||||
label: 'Copy',
|
label: 'Copy',
|
||||||
id: 'copyMenuItem',
|
id: 'copyMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.copy()
|
contextMenu.copy()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const CUT = {
|
export const CUT = Object.freeze({
|
||||||
label: 'Cut',
|
label: 'Cut',
|
||||||
id: 'cutMenuItem',
|
id: 'cutMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.cut()
|
contextMenu.cut()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const PASTE = {
|
export const PASTE = Object.freeze({
|
||||||
label: 'Paste',
|
label: 'Paste',
|
||||||
id: 'pasteMenuItem',
|
id: 'pasteMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.paste()
|
contextMenu.paste()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const RENAME = {
|
export const RENAME = Object.freeze({
|
||||||
label: 'Rename',
|
label: 'Rename',
|
||||||
id: 'renameMenuItem',
|
id: 'renameMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.rename()
|
contextMenu.rename()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const DELETE = {
|
export const DELETE = Object.freeze({
|
||||||
label: 'Move To Trash',
|
label: 'Move To Trash',
|
||||||
id: 'deleteMenuItem',
|
id: 'deleteMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.remove()
|
contextMenu.remove()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const SHOW_IN_FOLDER = {
|
export const SHOW_IN_FOLDER = Object.freeze({
|
||||||
label: 'Show In Folder',
|
label: 'Show In Folder',
|
||||||
id: 'showInFolderMenuItem',
|
id: 'showInFolderMenuItem',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.showInFolder()
|
contextMenu.showInFolder()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
@ -1,61 +1,61 @@
|
|||||||
import * as contextMenu from './actions'
|
import * as contextMenu from './actions'
|
||||||
|
|
||||||
export const SEPARATOR = {
|
export const SEPARATOR = Object.freeze({
|
||||||
type: 'separator'
|
type: 'separator'
|
||||||
}
|
})
|
||||||
|
|
||||||
export const CLOSE_THIS = {
|
export const CLOSE_THIS = Object.freeze({
|
||||||
label: 'Close',
|
label: 'Close',
|
||||||
id: 'closeThisTab',
|
id: 'closeThisTab',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.closeThis(menuItem._tabId)
|
contextMenu.closeThis(menuItem._tabId)
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const CLOSE_OTHERS = {
|
export const CLOSE_OTHERS = Object.freeze({
|
||||||
label: 'Close others',
|
label: 'Close others',
|
||||||
id: 'closeOtherTabs',
|
id: 'closeOtherTabs',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.closeOthers(menuItem._tabId)
|
contextMenu.closeOthers(menuItem._tabId)
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const CLOSE_SAVED = {
|
export const CLOSE_SAVED = Object.freeze({
|
||||||
label: 'Close saved tabs',
|
label: 'Close saved tabs',
|
||||||
id: 'closeSavedTabs',
|
id: 'closeSavedTabs',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.closeSaved()
|
contextMenu.closeSaved()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const CLOSE_ALL = {
|
export const CLOSE_ALL = Object.freeze({
|
||||||
label: 'Close all tabs',
|
label: 'Close all tabs',
|
||||||
id: 'closeAllTabs',
|
id: 'closeAllTabs',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.closeAll()
|
contextMenu.closeAll()
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const RENAME = {
|
export const RENAME = Object.freeze({
|
||||||
label: 'Rename',
|
label: 'Rename',
|
||||||
id: 'renameFile',
|
id: 'renameFile',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.rename(menuItem._tabId)
|
contextMenu.rename(menuItem._tabId)
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const COPY_PATH = {
|
export const COPY_PATH = Object.freeze({
|
||||||
label: 'Copy path',
|
label: 'Copy path',
|
||||||
id: 'copyPath',
|
id: 'copyPath',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.copyPath(menuItem._tabId)
|
contextMenu.copyPath(menuItem._tabId)
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
|
||||||
export const SHOW_IN_FOLDER = {
|
export const SHOW_IN_FOLDER = Object.freeze({
|
||||||
label: 'Show in folder',
|
label: 'Show in folder',
|
||||||
id: 'showInFolder',
|
id: 'showInFolder',
|
||||||
click (menuItem, browserWindow) {
|
click (menuItem, browserWindow) {
|
||||||
contextMenu.showInFolder(menuItem._tabId)
|
contextMenu.showInFolder(menuItem._tabId)
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
@ -43,7 +43,7 @@ export const getHunspellLanguageName = langCode => {
|
|||||||
|
|
||||||
// All available Hunspell dictionary languages.
|
// All available Hunspell dictionary languages.
|
||||||
// NOTE: Listed as value/label due to settings requirements.
|
// NOTE: Listed as value/label due to settings requirements.
|
||||||
export const HUNSPELL_DICTIONARY_LANGUAGE_MAP = [{
|
export const HUNSPELL_DICTIONARY_LANGUAGE_MAP = Object.freeze([{
|
||||||
label: 'Afrikaans', // Afrikaans
|
label: 'Afrikaans', // Afrikaans
|
||||||
value: 'af-ZA'
|
value: 'af-ZA'
|
||||||
}, {
|
}, {
|
||||||
@ -169,4 +169,4 @@ export const HUNSPELL_DICTIONARY_LANGUAGE_MAP = [{
|
|||||||
}, {
|
}, {
|
||||||
label: 'Tiếng Việt', // Vietnamese
|
label: 'Tiếng Việt', // Vietnamese
|
||||||
value: 'vi-VN'
|
value: 'vi-VN'
|
||||||
}]
|
}])
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
export const MT_MARKED_OPTIONS = {
|
export const MT_MARKED_OPTIONS = Object.freeze({
|
||||||
headerIds: false,
|
headerIds: false,
|
||||||
emoji: false,
|
emoji: false,
|
||||||
math: false,
|
math: false,
|
||||||
frontMatter: false
|
frontMatter: false
|
||||||
}
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user