Skip to content

Commit

Permalink
Merge pull request #3675 from owid/ref-commas-fix
Browse files Browse the repository at this point in the history
🐛 fix ref commas appearing in gdoc articles when paragraph text is between them
  • Loading branch information
ikesau authored May 31, 2024
2 parents a3bdaf2 + f5b591e commit bc19dbc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions site/gdocs/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export function renderSpan(
): React.ReactElement {
return match(span)
.with({ spanType: "span-simple-text" }, (span) => (
<React.Fragment key={key}>{span.text}</React.Fragment>
<span key={key}>{span.text}</span>
))
.with({ spanType: "span-link" }, (span) => (
<LinkedA span={span} key={key} />
Expand Down Expand Up @@ -217,9 +217,7 @@ export function renderSpan(
<q key={key}>{renderSpans(span.children)}</q>
))
.with({ spanType: "span-fallback" }, (span) => (
<React.Fragment key={key}>
{renderSpans(span.children)}
</React.Fragment>
<span key={key}>{renderSpans(span.children)}</span>
))
.exhaustive()
}
Expand Down

0 comments on commit bc19dbc

Please sign in to comment.