Skip to content

Commit

Permalink
WIP: Add more table tags
Browse files Browse the repository at this point in the history
  • Loading branch information
earthboundkid committed May 16, 2024
1 parent a64c0cb commit 3a43000
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
11 changes: 6 additions & 5 deletions internal/db/gdocs.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ type GDocsMetadata struct {
}

const (
ImageEmbedTag = "image"
RawEmbedTag = "raw"
ToCEmbedTag = "toc"
SpotlightEmbedTag = "spl"
ImageEmbedTag = "image"
RawEmbedTag = "raw"
ToCEmbedTag = "toc"
SpotlightRawEmbedTag = "spl"
PartnerRawEmbedTag = "partner"
)

type Embed struct {
Expand All @@ -56,7 +57,7 @@ func (em *Embed) UnmarshalJSON(data []byte) error {
return err
}
em.Value = img
case RawEmbedTag, ToCEmbedTag, SpotlightEmbedTag:
case RawEmbedTag, ToCEmbedTag, SpotlightRawEmbedTag, PartnerRawEmbedTag:
var s string
if err := json.Unmarshal(temp.Value, &s); err != nil {
return err
Expand Down
3 changes: 3 additions & 0 deletions internal/db/testdata/gdoc spl/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ Only on *dot* org:
cta="Visit the Election Center →"
limit="12"
>}}
Some <strong>bold</strong> and <em>italic</em> text. Spotlight PA is blah blah.

Loading

0 comments on commit 3a43000

Please sign in to comment.