chrisdhaan / CDMarkdownKit

An extensive Swift framework providing simple and customizable markdown parsing.
MIT License
250 stars 65 forks source link

Crash with automatic link #6

Open WillBishop opened 6 years ago

WillBishop commented 6 years ago

What did you do?

ℹ Please replace this with what you did.
This is unclear as I have CDMarkdownKit in a deployed application.

What did you expect to happen?

For it not to crash?

What happened instead?

It crashes with CDMarkdownAutomaticLink.regularExpression()

CDMarkdownKit Environment

CDMarkdownKit version:
Xcode version: 9.3
Swift version: 4.1
Platform(s) running CDMarkdownKit: watchOS
macOS version running Xcode: Latest

Here is the report: https://pastebin.com/umuVpw8c

chrisdhaan commented 6 years ago

@WillBishop I'm sorry you experienced a crash. But without knowing the URL that was passed into the regular expression I'm quite sure how to troubleshoot this. My guess is a malformed URL was passed in. Though I could look into a more graceful failover.

WillBishop commented 6 years ago

Ah ok. I’m not sure what the URL was either since I only have the crash report in Xcode. Well I haven’t gotten that crash again afaik so don’t bother with it if it’ll take too long

On 2 May 2018, 6:57 AM +0930, Christopher de Haan notifications@github.com, wrote:

@WillBishop I'm sorry you experienced a crash. But without knowing the URL that was passed into the regular expression I'm quite sure how to troubleshoot this. My guess is a malformed URL was passed in. Though I could look into a more graceful failover. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

chrisdhaan commented 6 years ago

I'll keep this open in case the issue pops up again. And I'll keep it in the back of my mind to see if theres a better way for error handling with that method.