在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):commonsguy/cwac-anddown开源软件地址(OpenSource Url):https://github.com/commonsguy/cwac-anddown开源编程语言(OpenSource Language):C 96.8%开源软件介绍(OpenSource Introduction):CWAC AndDown: Markdown. Android. Perfect Together.Markdown is a popular markup language for wikitext and the like. While there are Java-based Markdown processors available, these are likely to be slow on Android, where they run at all. This project offers an Android-compliant wrapper around hoedown, a C-based Markdown parser and HTML generator. By using the NDK with this C library, parsing speeds are nice and fast -- 5K of input can be converted into HTML in about 1 millisecond. If your objective is to put the results of Markdown in a If you would prefer a Markdown->HTML converter that does not involve native code, consider commonmark-java. InstallationOption #1: Clone the repository and add the Option #2: Use the AAR artifact for use with Gradle. To use that, add the following
blocks to your repositories {
maven {
url "https://s3.amazonaws.com/repo.commonsware.com"
}
}
dependencies {
compile 'com.commonsware.cwac:anddown:0.4.0'
} Or, if you cannot use SSL, use The AAR artifact contains compiled binaries for all CPU architectures, so you do not need the NDK to use the library. You will need it if you want to build the library from source code. UsageCreate an instance of AndDown andDown=new AndDown();
String result=andDown.markdownToHtml("Hello, world"); There is also a three-parameter version of AndDown andDown=new AndDown();
String result=andDown.markdownToHtml("This \"contains\" a quote", AndDown.HOEDOWN_EXT_QUOTE, 0); The AndDown source shows the available values for the extensions and flags. In terms of what they mean... hoedown does not really document them. YMMV. And, that's pretty much it, at least at this time. There is no statefulness in the UpgradingUpgrading to v0.3.0 from earlier versions should work without changes, except
that the LimitationsThe Markdown spec says that Markdown converted to HTML should use
Also, while hoedown is very fast, using the resulting HTML will inevitably
be slower. The same 5K sample file that hoedown processes in about 1
millisecond takes a 100+ milliseconds to convert into a The author of this project is a complete klutz when it comes to C/JNI/NDK development. You have been warned. DependenciesThis project has no dependencies. This repository includes a copy of the relevant files from the hoedown project. This project should work on API Level 8 and higher — please report bugs if you find otherwise. VersionThe latest version of this library is v0.4.0. Um, yay? DemoIn the Additional DocumentationJavaDocs are available, though since the API is pretty limited, there is little information to be found there. The Busy Coder's Guide to Android Development contains a chapter on the NDK that includes coverage of this library. LicenseThe code in this project is licensed under the Apache Software License 2.0, per the terms of the included LICENSE file. The hoedown source code is available under its own license, which appears to be a modified BSD license. QuestionsIf you have questions regarding the use of this code, please post a question
on StackOverflow tagged with
You are also welcome to join the CommonsWare Community and post questions and ideas to the CWAC category. If you have encountered what is clearly a bug, please post an issue. Be certain to include complete steps for reproducing the issue. The contribution guidelines provide some suggestions for how to create a bug report that will get the problem fixed the fastest. Do not ask for help via social media. Release Notes
Who Made This? |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论