mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #462 from omnivore-app/fix/parse-substack
This commit is contained in:
commit
765be8314c
2 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ export class SubstackHandler extends NewsletterHandler {
|
|||
this.defaultUrl = 'https://www.substack.com'
|
||||
}
|
||||
|
||||
getNewsletterUrl(postHeader: string, _html: string): string | undefined {
|
||||
parseNewsletterUrl(postHeader: string, _html: string): string | undefined {
|
||||
// raw SubStack newsletter url is like <https://hongbo130.substack.com/p/tldr>
|
||||
// we need to get the real url from the raw url
|
||||
return addressparser(postHeader).length > 0
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ describe('Newsletter email test', () => {
|
|||
it('returns url when email is from SubStack', () => {
|
||||
const rawUrl = '<https://hongbo130.substack.com/p/tldr>'
|
||||
|
||||
expect(new SubstackHandler().getNewsletterUrl(rawUrl, '')).to.equal(
|
||||
expect(new SubstackHandler().parseNewsletterUrl(rawUrl, '')).to.equal(
|
||||
'https://hongbo130.substack.com/p/tldr'
|
||||
)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue