540ba6e74e
Implementation is inspired by already existing in Markwon image and link processing but has to work around some limitations of writing an external plugin. The first one is storing brackets ourselves. Stored brackets need to be cleared when a new block starts. Markwon does it in MarkwonInlineProcessor but there is no callback that we could use. Clearing storage from our own block parser is unreliable as it is not guaranteed to be called. Instead, every time we need to access the storage we compare current block with the last used block and clear storage if necessary. The second problem is actually a feature of Markwon that it applies spans in reverse order of calls to MarkwonVisitor#setSpansForNode. This causes other spans like links and code to be drawn over spoilers making them visible. Adding spans with a different priority doesn't help as it would require negative priority. Instead we just remove all the SpoilerSpans from the final string and add them again, so they are applied last as we want. |
||
---|---|---|
.github | ||
app | ||
fastlane/metadata/android/en-US | ||
gradle/wrapper | ||
.gitignore | ||
build.gradle | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
LICENSE | ||
README.md | ||
settings.gradle |
Infinity For Reddit
A Reddit client on Android written in Java. It does not have any ads and it features a clean UI and smooth browsing experience
Donation
Patreon: https://www.patreon.com/docile_alligator
Bitcoin: bc1qxtkd5ap9na7uy8nr9qpt6jny6tdwaj4v43ddle
Table of Contents
About The Project
Key features of Infinity For Reddit:
|
Contributing
First off, thanks for taking the time to contribute! Contributions are what makes the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request.
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Here are other ways you can help:
License
Distributed under the AGPL-3.0 License. See LICENSE for more information.
Contact
u/Hostilenemy - docilealligator.app@gmail.com (Owner)
or u/Wladefant - wladefant@gmail.com (Collaborator)
Project Link: https://github.com/Docile-Alligator/Infinity-For-Reddit