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

Parsing error #9

Open
mps opened this issue Apr 18, 2013 · 12 comments
Open

Parsing error #9

mps opened this issue Apr 18, 2013 · 12 comments

Comments

@mps
Copy link

mps commented Apr 18, 2013

When I attempt to parse a NSString that contains a '<' or '>' then I end up getting a crash in memory (BAD_EXEC_ACCESS).

Is this a known issue?

Thanks

Example (edit to view raw text, GH formats it as markdown):

On Apr 16, 2013, at 7:56 PM, Matthew Strickland notifications@github.com wrote:

Test


Reply to this email directly or view it on GitHub.

@dreamwieber
Copy link
Owner

I'm not able to reproduce this. Maybe you could post a gist or some more details about what you're doing with your string? Or a stack trace?

@mrardon
Copy link

mrardon commented Apr 18, 2013

I just experienced this issue as well, was stumped until I saw this issue. Here is the text I am using

AppName

Created by <email@someaddress.com>

@mps
Copy link
Author

mps commented Apr 18, 2013

@mps
Copy link
Author

mps commented Apr 18, 2013

@dreamwieber the problem appears to be here: https://github.com/dreamwieber/AttributedMarkdown/blob/master/markdown_output.m#L196

because it is parsing the markdown as a URL <matthew@idlefusion.com> but it is really null.

/cc @mrardon

@dreamwieber
Copy link
Owner

Thanks -- I'll look into it.

Sent from my iPhone

On Apr 18, 2013, at 12:53 PM, Matthew Strickland notifications@github.com wrote:

@dreamwieber the problem appears to be here: https://github.com/dreamwieber/AttributedMarkdown/blob/master/markdown_output.m#L196

because it is parsing the markdown as a URL matthew@idlefusion.com but it is really null.

/cc @mrardon


Reply to this email directly or view it on GitHub.

@dreamwieber
Copy link
Owner

URL support is somewhat experimental -- it's not officially supported as an NSAttributedString attributed yet on iOS, so I think it's quite possibly the cause. I did notice that the brackets seem irrelevant to the crash. It looks like the @ symbol inside the brackets is what triggers it. (I am having a hard time deciphering the string in your example @mps )

It may be a little while until I can track this down. If you're able to build the library yourself from source, you may be able to work around it temporarily by commenting out the URL code linked to by @mps.

@mrardon
Copy link

mrardon commented Apr 19, 2013

Just as a note I was able to get (email@somewhere.com) (with parens not angle brackets) to work as I didn't really need a link, just an email address in plaintext.

So it may not be just the @ sign but may be the combination of @.

Thanks

@mps
Copy link
Author

mps commented Apr 19, 2013

Thanks for the heads up

@mps
Copy link
Author

mps commented Apr 19, 2013

For now I have gone ahead and just replaced the appropriate strings before setting them. 👍

@dreamwieber
Copy link
Owner

Definitely appears to be specifically related to the brackets AND the @ symbol.

I dug around today, but couldn't figure the root cause. I'll have to see how the peg-markdown library behaves with that input string...

Sent from my iPhone

On Apr 19, 2013, at 10:42 AM, Matt Rardon notifications@github.com wrote:

Just as a note I was able to get (email@somewhere.com) to work as I didn't really need a link, just an email address in plaintext.

So it may not be just the @ sign but may be the combination of @.

Thanks


Reply to this email directly or view it on GitHub.

@mps
Copy link
Author

mps commented Apr 19, 2013

+1 @dreamwieber

Any plans to support emoji ala github?

@dreamwieber
Copy link
Owner

Not yet, but feel free to open an 'enhancement' ticket for it.

On Fri, Apr 19, 2013 at 4:05 PM, Matthew Strickland <
notifications@github.com> wrote:

+1 @dreamwieber https://github.com/dreamwieber

Any plans to support emoji ala github?


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-16694182
.

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

No branches or pull requests

3 participants