Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix first line
  • Loading branch information
pomber committed Jun 23, 2023
commit 9bfb5c01f0a649ea1397180a467765541b90dc32
12 changes: 10 additions & 2 deletions packages/mdx/src/chat/use-conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,17 @@ function getFiles(
return {
name: fileInfo.name,
code: {
// TODO this should be just lines: []
lines: [
{ tokens: [{ content: "x", props: {} }] },
{
tokens: [
{
content: ".",
props: {
style: { color: "transparent" },
},
},
],
},
],
lang: fileInfo.lang,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mdx/src/smooth-code/splitter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export function splitTokens(
...extremes.map(e => e.end),
]

let oldTokens = tokens
let oldTokens = tokens || []
splitIndexes.forEach(splitIndex => {
const newTokens = [] as MergedLine["tokens"]
let i = 0
Expand Down