Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse person smart chips #164

Merged
merged 2 commits into from
May 2, 2023
Merged

Parse person smart chips #164

merged 2 commits into from
May 2, 2023

Conversation

jfreda
Copy link
Collaborator

@jfreda jfreda commented May 2, 2023

Person smart chips (when a user in a Google Doc types an @ and selects a person name) create Person elements in the structure of a document, which were not being parsed correctly for email addresses. This PR fixes that and adds tests!

@jfreda jfreda requested a review from a team as a code owner May 2, 2023 16:25
@@ -438,6 +438,8 @@ func buildLabelAndValueString(label string, p *docs.Paragraph) string {
for _, e := range p.Elements {
if e.TextRun != nil {
s += e.TextRun.Content
} else if e.Person != nil && e.Person.PersonProperties != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@jfreda jfreda merged commit 5cab618 into main May 2, 2023
@jfreda jfreda deleted the jfreda/parse-person-smart-chips branch May 2, 2023 19:11
anuragprafulla pushed a commit to razorpay/hermes that referenced this pull request Jun 27, 2023
* Parse person smart chips

* Add tests for parsing a paragraph for email addresses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants