Skip to content

Commit

Permalink
Try fix Android sharing again
Browse files Browse the repository at this point in the history
  • Loading branch information
s-thom committed Apr 29, 2022
1 parent 15edb40 commit fdcc0fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/s-thom/linkdrop/compare/v1.3.0...HEAD) - DATE

### Fixed

- Sharing URLs to the installed website in Android should work for realsies this time.

## [1.3.1](https://github.com/s-thom/linkdrop/compare/v1.3.1...HEAD) - DATE

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion app/routes/__layout/links/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const loader: LoaderFunction = async ({ request }) => {

if (!url && description) {
// Android doesn't send URLs, because its intents don't support it.
const match = description.match(/^(?:([\S\s]*)\s+)(https?:\/\/[^\s]+)$/);
const match = description.match(/^(?:([\S\s]*)\s+)?(https?:\/\/[^\s]+)$/);
if (match) {
const [, desc, link] = match;
return json<LoaderData>({ url: link, description: desc ?? title });
Expand Down

0 comments on commit fdcc0fa

Please sign in to comment.