-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add first-class link support to Related Resources #271
Conversation
if (docID.includes("?draft=false")) { | ||
docID = docID.replace("?draft=false", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be more resilient to check with endsWith()
and then trim with slice()
or something? It's an edge case, but the current code would execute on ?draft=false
in the middle of the string.
void this.args.search(this.dd, this.query); | ||
break; | ||
case RelatedResourceQueryType.AlgoliaGetObject: | ||
let docID = this.query.split("/document/").pop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this assume that any URL with /document/
in it is a Google Docs URL? We might want to check for the full https://docs.google.com/document/d/
prefix instead?
f4e71e1
to
fb4439b
Compare
fb4439b
to
69214d0
Compare
Add support for first-class Hermes links in the Related Resources input.
getObject
query based on the:document_id
[validShortLink]/[validDocType]/[invalidDocNumber]
)