Browse
For agents
About
Block Animations, Motion & Scroll Effects – Ghost Kit
/
3.4.1
Block Animations, Motion & Scroll Effects – Ghost Kit
v3.4.1
Switch version
3.7.2
3.7.1
3.7.0
3.6.1
trunk
1.6.3
2.25.0
3.3.0
3.3.1
3.3.2
3.3.3
3.4.0
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
3.4.6
3.5.0
3.5.1
3.6.0
Overview
Code
ghostkit
/
gutenberg
/
blocks
/
gist
/
transforms.js
transforms.js
in Block Animations, Motion & Scroll Effects – Ghost Kit 3.4.1, at gutenberg/blocks/gist/transforms.js
28 lines
481 B
Find file
t
No matching file
Up and down to move
Enter to open
Esc to close
Raw
Download
Zip
View raw
1
import
{
createBlock
}
from
'
@wordpress/blocks
'
;
2
3
export
default
{
4
from
:
[
5
{
6
type
:
'
raw
'
,
7
priority
:
1
,
8
isMatch
:
(
node
)
=>
{
9
const
match
=
10
node
.
nodeName
===
'
P
'
&&
11
/
^
https:
\/
\/
gist
.
github
.
com
?
.
+
\/
(
.
+
)
/
g
.
exec
(
12
node
.
textContent
13
)
;
14
15
if
(
match
&&
typeof
match
[
1
]
!==
'
undefined
'
)
{
16
return
true
;
17
}
18
19
return
false
;
20
}
,
21
transform
:
(
node
)
=>
22
createBlock
(
'
ghostkit/gist
'
,
{
23
url
:
node
.
textContent
.
trim
(
)
,
24
}
)
,
25
}
,
26
]
,
27
}
;
28