Age | Commit message (Collapse) | Author |
|
|
|
* Reformatted all source files.
* Added 'format' target to Makefile.
* Removed 'astyle' target.
* Updated .editorconfig.
|
|
* Added `CMARK_OPT_SAFE`. This option disables rendering of raw HTML
and potentially dangerous links.
* Added `--safe` option in command-line program.
* Updated `cmark.3` man page.
* Added `scan_dangerous_url` to scanners.
* In HTML, suppress rendering of raw HTML and potentially dangerous
links if `CMARK_OPT_SAFE`. Dangerous URLs are those that begin
with `javascript:`, `vbscript:`, `file:`, or `data:` (except for
`image/png`, `image/gif`, `image/jpeg`, or `image/webp` mime types).
* Added `api_test` for `OPT_CMARK_SAFE`.
* Rewrote `README.md` on security.
|
|
|
|
|
|
Rewrote man.c using new renderer framework.
|
|
* New exported function in API: `cmark_render_latex`.
* Added src/latex.hs.
* Updated README and man page.
* Closes #31.
|
|
This is easier to access using ffi, since some languages, like C#
like to use only function interfaces for accessing library
functionality.
fixes #60
|
|
Also command line option `--validate-utf8`.
This option causes cmark to check for valid UTF-8,
replacing invalid sequences with the replacement
character, U+FFFD.
Reinstated api tests for utf8.
|
|
|
|
This controls column width for hard wrapping. By default it is
0, which means that no wrapping will be done.
Added a width parameter in `cmark_render_commonmark`.
|
|
This is still incomplete. (See TODOs in the source.)
|
|
|
|
This was a bug; the function does take an argument. Oddly, gcc and
clang did not complain.
Closes #12.
|
|
|
|
For consistency with the API.
|
|
Also to some non-exported functions in blocks and inlines.
|
|
So far this is only implemented for the HTML renderer.
Ultimately some of this should be factored out into a form that
can be used in other renderers.
|
|
Only the date changed, but this is needed to avoid building
the page on a git checkout.
|
|
Add a new template cmark_version.h.in to generate cmark_version.h
containing version information.
|
|
Add version number and string as macros and symbols. Version numbers can
be easily compared, for example in the C preprocessor:
#include <cmark.h>
#if CMARK_VERSION < 0x020200
#error Requires libcmark 2.2.0 or higher
#endif
Storing the version in a global variable allows to check the library
version at runtime. For example:
if (CMARK_VERSION != cmark_version) {
warn("Compiled against libcmark %s, but using %s",
CMARK_VERSION_STRING, cmark_version_string);
}
The version should be updated whenever the public API is changed.
|
|
|
|
|
|
It simplifies the build if python and the cmark library aren't
needed to build the man page.
The top level Makefile has a rule to regenerate this when src/cmark.h
changes.
Updated Makefile.nmake for recent changes.
Added case folding data file to archive, since otherwise make fails.
|
|
Remove it from the repository. Closes #241.
|
|
In the last few commits we were using as.code.fenced and as.literal at
the same time for NODE_CODE_BLOCK, which obviously led to problems.
|
|
Reverts 225d720.
|
|
|
|
|
|
This is for consistency with the other types of nodes that have
literal strings as contents.
|
|
|
|
|
|
Don't build man pages until we've built libcmark, which we need.
Also reverted use of typewriter font for signatures; this looks
worse in the terminal pager.
|
|
|
|
`man/make_man_page.py` now converts using cmark.
|
|
cmark: Replaced `--man` and `--ast` with generic `--to` option.
|
|
* Added `iterator.c`, `iterator.h`.
* Removed `cmark_walk`.
* Replaced `cmark_walk` with iterator in HTML renderer.
* Replaced API test for `cmark_walk` with simple iterator test.
|
|
Added cmark_event_type enum, which is used as the second
parameter of the handler passed to cmark_walk.
See #224.
|
|
Modified finalize in blocks.c to return parent of finalized
block, so we can handle the case of reference definitions,
when we simply remove the finalized block.
|
|
This reverts commit b598b52a4acdc2332be3d34e30237d1b93b7dd03.
The change led to some problems, because some of the callers
of 'finalize' expected the node to exist after the call.
This could all be rewritten, but for now let's just revert.
|
|
|
|
There's no reason to store these empty nodes in the API.
The references have already been resolved.
|
|
|
|
This reverts commit 6c1f76a8a22f6c84231e5101f0950ce353ec8075.
|
|
|
|
This is more consistent with CMARK_LIST_NONE, etc.
|
|
This is the return value of cmark_get_node_type when the argument
is a null pointer. Avoids segfault.
|
|
|
|
|
|
|