Improve highlighting and linking
This commit is contained in:
parent
1637cc2056
commit
bbb6b44416
|
@ -14,7 +14,11 @@ import getCaretCoordinates from './caret-position'
|
|||
import moment from 'moment'
|
||||
import PrismJS from 'prismjs'
|
||||
import 'prismjs/components/prism-php'
|
||||
import 'prismjs/components/prism-go'
|
||||
import 'prismjs/components/prism-perl'
|
||||
import 'prismjs/components/prism-css'
|
||||
import 'prismjs/components/prism-markup-templating'
|
||||
import 'prismjs/components/prism-jq'
|
||||
import './styles.scss';
|
||||
import '../node_modules/jquery-contextmenu/dist/jquery.contextMenu.css';
|
||||
|
||||
|
@ -174,14 +178,16 @@ $(document).on('popup:selected', '#autocomplete', function (event, linkName, res
|
|||
})
|
||||
|
||||
if (holder) {
|
||||
const MD = new MarkdownIt()
|
||||
const MD = new MarkdownIt({
|
||||
linkify: true
|
||||
})
|
||||
MD.use(MarkdownItWikilinks({
|
||||
baseURL: holder.dataset.baseUrl,
|
||||
uriSuffix: '',
|
||||
relativeBaseURL: '/edit/',
|
||||
htmlAttributes: {
|
||||
class: 'wiki-link'
|
||||
}
|
||||
},
|
||||
})).use(MarkdownItMark)
|
||||
|
||||
const options = {
|
||||
|
@ -317,6 +323,7 @@ if (holder) {
|
|||
}
|
||||
if (searchEnabled && event.key === 'Escape') {
|
||||
searchEnabled = false
|
||||
return false;
|
||||
}
|
||||
|
||||
let value = input.value
|
||||
|
|
Loading…
Reference in New Issue
Block a user