-
Notifications
You must be signed in to change notification settings - Fork 300
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
Header anchor extension fails on android #71
Comments
The |
Thanks! Yeah, looks like it :/. I'll have a look at fixing this tomorrow! And adding that extension to the Android test project as well, which would have caught this problem earlier. |
This way, we also catch Android incompatibilities in extension code.
This way, we also catch Android incompatibilities in extension code.
Weird, I've added the extensions to the Android test project and had a successful build using the current code: https://travis-ci.org/atlassian/commonmark-java/builds/174119393 Have to investigate more. Do you know if this might depend on the build configuration or something? The one we're using is here: https://github.com/atlassian/commonmark-java/blob/extensions-in-android-tests/commonmark-android-test/app/build.gradle |
I've run locally and I get the same error:
I also tried running on two physical devices and got the same thing. I should mention that the above was run on an android 23 emulator because the v15 image failed to download and I already had a v23 image. I will continue to consider this. |
I just ran on an API 17 emulator and it passed. |
That's weird.. I wonder if they just ignored unknown flags before, but then became stricter? Can you try if changing this line to this works?:
|
Made the change, but I get test failures:
Looks like the embedded flag expression isnt picked up. Sad day. I did build the extension without tests and added the dependency. It crashes with the following:
|
The sad part is that Android always uses them anyway, according to the docs: https://developer.android.com/reference/java/util/regex/Pattern.html#UNICODE_CHARACTER_CLASS
Can you see if this works?:
(Thanks for your help with this!) |
Still have one test failure:
Android also seems to dislike it:
|
I made a terrible, fragile, hacky, sheild-your-eyes solution that works...
According to the docs, here is a list of System properties that should always be available. I suppose you could pick your favorite amongst these. It specifically says
but we already know that Dalvik is being replaced by ART. Regardless, anything on android API 21+ should be on ART. My test was on API 25 and it passes so I think it should be okay from that perspective. Obviously its far from ideal as a long-term solution, but its a backup plan I guess. |
Thanks for the suggestion. I didn't want to hardcode that test, but I've gone with something very similar: #72 Let me know if that fixes the problem for you, and I'll merge and release in the next few days. |
ext-heading-anchor: Recover from IllegalArgumentException on Android (#71)
I've merged the change, let me know if we need to do any follow-up. I'll add another comment here when this is released. |
Released in version 0.8.0 now 🎉! Thanks for all the help @scottTomaszewski. |
Awesome! Thanks!
On Thu, Dec 8, 2016 at 9:47 PM Robin Stocker ***@***.***> wrote:
Released in version 0.8.0
<https://github.com/atlassian/commonmark-java/releases/tag/commonmark-parent-0.8.0>
now 🎉! Thanks for all the help @scottTomaszewski
<https://github.com/scottTomaszewski>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#71 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFDMrACTy8PXW_K63_osu4UOSzxUsz-pks5rGMFJgaJpZM4Kp0-9>
.
--
Scott Tomaszewski
[email protected]
443-353-9754
|
When running the renderer on android, I get an IllegalArgumentException:
Here is the code I am using to run the renderer
And here is the relevant section of my gradle config
This looks very similar to this issue. Any help would be great, thanks!
The text was updated successfully, but these errors were encountered: