Merge pull request #2909 from continuedev/pe/fix-apply-bug
bugfix: get codeblocks for pretoolbar
This commit is contained in:
commit
6af3c93eab
1 changed files with 5 additions and 6 deletions
|
|
@ -136,13 +136,12 @@ function processCodeBlocks(tree: any) {
|
|||
node.lang = node.lang.split(".").slice(-1)[0];
|
||||
}
|
||||
|
||||
node.data = node.data || {};
|
||||
node.data.hProperties = node.data.hProperties || {};
|
||||
node.data.hProperties.codeBlockContent = node.value;
|
||||
node.data.hProperties.isGeneratingCodeBlock = lastCodeNode === node;
|
||||
|
||||
if (node.meta) {
|
||||
node.data = node.data || {};
|
||||
node.data.hProperties = node.data.hProperties || {};
|
||||
|
||||
node.data.hProperties.isGeneratingCodeBlock = lastCodeNode === node;
|
||||
node.data.hProperties.codeBlockContent = node.value;
|
||||
|
||||
let meta = node.meta.split(" ");
|
||||
node.data.hProperties.filepath = meta[0];
|
||||
node.data.hProperties.range = meta[1];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue