mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 03:26:47 +08:00
fix(code): add robust
This commit is contained in:
@@ -36,7 +36,6 @@ export class CodeBlock extends BaseView {
|
|||||||
}): Promise<HTML2BlockResult> {
|
}): Promise<HTML2BlockResult> {
|
||||||
// debugger;
|
// debugger;
|
||||||
if (element.tagName === 'CODE') {
|
if (element.tagName === 'CODE') {
|
||||||
debugger;
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
type: this.type,
|
type: this.type,
|
||||||
@@ -50,7 +49,9 @@ export class CodeBlock extends BaseView {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
lang: element.classList[0].substr(9),
|
lang:
|
||||||
|
element.classList[0] &&
|
||||||
|
element.classList[0].substr(9),
|
||||||
},
|
},
|
||||||
children: [],
|
children: [],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user