Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modify markdown's mark text
Browse files Browse the repository at this point in the history
wangcheng15 committed Jan 21, 2022
1 parent cd32b1e commit 4c44c18
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/index.js
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ export const dataSourceList = [
]
export const notebookNameReg = /^[\u4e00-\u9fa9A-Za-z0-9_]+$/

export const MarkdownTag = '-- Markdown'
export const MarkdownTag = '--%markdown'
export const PythonTag = '#%python'
export const SpecialCodeSuggestKey = ['.', '/', '`', '\'', '"']

4 changes: 4 additions & 0 deletions src/page/Workspace/Notebook/CellList/index.vue
Original file line number Diff line number Diff line change
@@ -635,6 +635,10 @@ export default {
*/
dataProcess (cellList = []) {
return cellList.map(item => {
// compatible markdown's history mark
if (item.content && item.content.startsWith('-- Markdown')) {
item.content = item.content.replace('-- Markdown', MarkdownTag)
}
if (item.content && item.content.startsWith(MarkdownTag)) {
item.content = item.content.replace(MarkdownTag, '')
// !!!从备份中取保存前编辑器的模式

0 comments on commit 4c44c18

Please sign in to comment.