|
|
|
@ -9,7 +9,8 @@ const EscapeSequences = { |
|
|
|
|
""" : '"', |
|
|
|
|
"<" : "<", |
|
|
|
|
">" : ">", |
|
|
|
|
"&" : "&" |
|
|
|
|
"&" : "&", |
|
|
|
|
"'" : "'" |
|
|
|
|
}; |
|
|
|
|
const EscapeSequencesRegex = new RegExp(Object.keys(EscapeSequences).join('|'), "g"); |
|
|
|
|
|
|
|
|
@ -27,9 +28,6 @@ const SlideItem = ({item}) => { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const content = useMemo(() => { |
|
|
|
|
|
|
|
|
|
if (item.type === "paragraph") |
|
|
|
|
console.log(item.type, item); |
|
|
|
|
switch (item.type) { |
|
|
|
|
case "heading": |
|
|
|
|
const level = item.level || item.depth; |
|
|
|
@ -94,6 +92,8 @@ const SlideItem = ({item}) => { |
|
|
|
|
case '"': |
|
|
|
|
case """: |
|
|
|
|
return '"'; |
|
|
|
|
case "'": |
|
|
|
|
return "'"; |
|
|
|
|
default: |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
@ -109,34 +109,4 @@ const SlideItem = ({item}) => { |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export default SlideItem; |
|
|
|
|
|
|
|
|
|
/* { |
|
|
|
|
"type": "paragraph", |
|
|
|
|
"raw": "This is a very fancy **bold** keynote", |
|
|
|
|
"text": "This is a very fancy **bold** keynote", |
|
|
|
|
"tokens": [ |
|
|
|
|
{ |
|
|
|
|
"type": "text", |
|
|
|
|
"raw": "This is a very fancy ", |
|
|
|
|
"text": "This is a very fancy " |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
"type": "strong", |
|
|
|
|
"raw": "**bold**", |
|
|
|
|
"text": "bold", |
|
|
|
|
"tokens": [ |
|
|
|
|
{ |
|
|
|
|
"type": "text", |
|
|
|
|
"raw": "bold", |
|
|
|
|
"text": "bold" |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
"type": "text", |
|
|
|
|
"raw": " keynote", |
|
|
|
|
"text": " keynote" |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} */ |
|
|
|
|
export default SlideItem; |