File tree Expand file tree Collapse file tree 1 file changed +1
-44
lines changed
projects/packages/jetpack-mu-wpcom/src/features/wpcom-blocks/code/block-definition Expand file tree Collapse file tree 1 file changed +1
-44
lines changed Original file line number Diff line number Diff line change @@ -13,50 +13,7 @@ const CODE_FENCE_REGEXP = /^```([a-z0-9+-]*)$/i;
1313
1414export const transforms = {
1515 from : [
16- // {
17- // type: 'block',
18- // blocks: [ 'core/paragraph' ],
19- // transform: ( { content }: { content: RichTextValue } ) =>
20- // createBlock( BLOCK_NAME, { code: content.text } ),
21- // },
22- //
23- // {
24- // type: 'block',
25- // blocks: [ 'core/html' ],
26- // transform: ( { content }: { content: string } ) => {
27- // console.log( { content, t: typeof content } );
28- // return createBlock( BLOCK_NAME, {
29- // code: content,
30- // language: 'HTML',
31- // languageConfidence: 'certain',
32- // } );
33- // },
34- // },
35- //
36- // {
37- // type: 'raw',
38- // priority: 5,
39- // isMatch: ( node: HTMLElement ) =>
40- // node.nodeName === 'PRE' &&
41- // node.children.length === 1 &&
42- // node.firstChild!.nodeName === 'CODE',
43- // transform: ( preElement: HTMLPreElement ) => {
44- // return createBlock( BLOCK_NAME, { code: preElement.innerText } );
45- // },
46- // schema: {
47- // pre: {
48- // children: {
49- // code: {
50- // children: {
51- // '#text': {},
52- // },
53- // },
54- // },
55- // },
56- // },
57- // },
58-
59- // Handle GH-like code fence openers, e.g. ```js
16+ // Handle code fence openers, e.g. ```js
6017 {
6118 type : 'enter' ,
6219 priority : 5 ,
You can’t perform that action at this time.
0 commit comments