mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Merge remote-tracking branch 'upstream/master' into add-unit-tests-for-lib-markdown
This commit is contained in:
8
browser/lib/i18n.js
Normal file
8
browser/lib/i18n.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// load package for localization
|
||||
const i18n = new (require('i18n-2'))({
|
||||
// setup some locales - other locales default to the first locale
|
||||
locales: ['en', 'sq', 'zh-CN', 'zh-TW', 'da', 'fr', 'de', 'ja', 'ko', 'no', 'pl', 'pt', 'es'],
|
||||
extension: '.json'
|
||||
})
|
||||
|
||||
export default i18n
|
||||
@@ -7,8 +7,6 @@ import ConfigManager from 'browser/main/lib/ConfigManager'
|
||||
import katex from 'katex'
|
||||
import {lastFindInArray} from './utils'
|
||||
|
||||
const config = ConfigManager.get()
|
||||
|
||||
function createGutter (str, firstLineNumber) {
|
||||
if (Number.isNaN(firstLineNumber)) firstLineNumber = 1
|
||||
const lastLineNumber = (str.match(/\n/g) || []).length + firstLineNumber - 1
|
||||
@@ -21,8 +19,9 @@ function createGutter (str, firstLineNumber) {
|
||||
|
||||
class Markdown {
|
||||
constructor (options = {}) {
|
||||
const config = ConfigManager.get()
|
||||
const defaultOptions = {
|
||||
typographer: true,
|
||||
typographer: config.preview.smartQuotes,
|
||||
linkify: true,
|
||||
html: true,
|
||||
xhtmlOut: true,
|
||||
|
||||
Reference in New Issue
Block a user