Remark is a library for taking (X)HTML input and outputting clean Markdown, Markdown Extra, or MultiMarkdown compatible text. The purpose of this conversion is mainly to allow for the use of client-side HTML GUI editors while retaining safe, mobile-device editable markdown text behind the scenes. It is recommended that the markdown text is stored, to reduce XSS attacks by code injection.
Remark can be configured to output extra functionality beyond straight markdown.
“
(“) and ”
(”) become "
‘
(‘), ’
(’), and '
become '
«
(«) becomes <<
»
(») becomes >>
…
(…) becomes ...
&endash;
(–) becomes --
&emdash;
(—) becomes ---
<br/>
is converted to just a single linebreak, instead of (space)(space)(newline)
, common in most third-party markdown renderershttp://www.overzealous.com
~~~
, or Github's format using ```
The basic theory is that you match the extensions to your Markdown conversion library.
Want to fork this project? Great! However, please note that I use hgflow to manage the develop-release cycle. If you are uncomfortable with that, that's fine, too! Just switch to the develop branch before working, or I won't be able to easily merge the changes back in.
Source code build is done via Gradle.
Remark depends on jsoup and Apache Commons Lang 3. If you want to use it from the command line, it also depends on Apache Commons CLI. Alternatively, you can download the standalone version of the Jar, which contains all the dependencies.
jsoup uses the MIT License, which is roughly comparable to the Apache 2.0 License used by Remark and the Apache dependencies.
During testing, Remark also depends on some additional libraries, which are automatically downloaded by the gradle build script.
Remark is released under the Apache 2.0 license.
Copyright 2011 OverZealous Creations, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.