mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 11:20:25 +08:00
* Removed the space in 'Mark Text' (#2763) Literally just replaced all occurances of 'Mark Text' with 'MarkText' using sed. This is directly related to #2763. * Revert changes to .github directory Reverted changelog etc. * Added `cs` alias for `csharp` in code blocks (Fixes #2760) * Added error handler in the renderer process (should fix #2758) The `src/muya/lib/contentState/clickCtrl.js` file will now return if `document.querySelector` fails to find an element.
This commit is contained in:
parent
14d9c83b0e
commit
2ed5a85012
@ -12,6 +12,9 @@ const clickCtrl = ContentState => {
|
|||||||
const lastBlock = this.getLastBlock()
|
const lastBlock = this.getLastBlock()
|
||||||
const archor = this.findOutMostBlock(lastBlock)
|
const archor = this.findOutMostBlock(lastBlock)
|
||||||
const archorParagraph = document.querySelector(`#${archor.key}`)
|
const archorParagraph = document.querySelector(`#${archor.key}`)
|
||||||
|
if (archorParagraph === null) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const rect = archorParagraph.getBoundingClientRect()
|
const rect = archorParagraph.getBoundingClientRect()
|
||||||
// If click below the last paragraph
|
// If click below the last paragraph
|
||||||
// and the last paragraph is not empty, create a new empty paragraph
|
// and the last paragraph is not empty, create a new empty paragraph
|
||||||
|
4
src/renderer/codeMirror/modes.js
vendored
4
src/renderer/codeMirror/modes.js
vendored
@ -166,6 +166,10 @@ const languages = [{
|
|||||||
name: 'csharp',
|
name: 'csharp',
|
||||||
mode: 'clike',
|
mode: 'clike',
|
||||||
mime: 'text/x-csharp'
|
mime: 'text/x-csharp'
|
||||||
|
}, {
|
||||||
|
name: 'cs',
|
||||||
|
mode: 'clike',
|
||||||
|
mime: 'text/x-csharp'
|
||||||
}, {
|
}, {
|
||||||
name: 'rust',
|
name: 'rust',
|
||||||
mode: 'rust',
|
mode: 'rust',
|
||||||
|
Loading…
Reference in New Issue
Block a user