Age | Commit message (Collapse) | Author |
|
This reduces the work that CMake needs to do to configure the libraries
by setting all the properties at once.
|
|
This uses the CMake mechanism for including the current source and
binary directories. This avoids the custom handling for this.
|
|
Avoid including the utility once, which should avoid some unnecessary
CMake checks, and reduces duplication.
|
|
* build: inline a variable
* build: use `LINKER_LANGUAGE` property for C++ runtime
Rather than explicitly name the C++ runtime, use the `LINKER_LANGUAGE`
property to use the driver to spell the C++ runtime appropriately.
* build: use CMake to control C standard
Rather than use compiler specific flags to control the language
standard, indicate to CMake the desired standard.
* build: use the correct variable
These flags are being applied to the *C* compiler, check the C compiler,
not the C++ compiler.
* build: loosen the compiler check
This loosens the compiler identifier check to enable matching AppleClang
which is the identifier for the Xcode compiler.
* build: hoist shared flags to top-level CMakeLists
This hoists the common shared flags handling to the top-level CMakeLists
from sub-layers. This prevents the duplication of the handling.
* build: remove duplicated flags
This is unnecessary, `/TP` is forced on all MSVC builds, no need to
duplicate the flag for older versions.
* build: loosen C compiler identifier check
Loosen the check to a match rather than equality check, this allows it
to match AppleClang which is the identifier for the Apple vended clang
compiler part of Xcode.
* build: use `add_compile_options`
Use `add_compile_options` rather than modify `CMAKE_C_FLAGS`. The
latter is meant to be only modified by the user, not the package
developer.
* build: hoist sanitizer flags to global state
This moves the CMAKE_C_FLAGS handling to the top-level and uses
`add_compile_options` rather than modifying the user controlled flags.
* build: hoist `-fvisibilty` flags to top-level
These are global settings, hoist them to the top level.
* build: hoist the debug flag handling
Use a generator expression and hoist the flag handling for the debug
build.
* build: hoist the profile flag handling
This is a global flag, hoist it to the top level and use
`add_compile_options` rather than modify the user controlled flags.
* build: remove incorrect variable handling
This seemed to be attempting to set the linker not the linker flags for
the profile configuration. This variable is not used, do not set it.
* build: remove unused CMake includes
|
|
This solves problems with adjacent code blocks being
merged.
|
|
by inserting an HTML comment. Closes #317.
I think I'll follow up with a change to use fenced code
blocks, but this was the minimal fix.
|
|
Closes #316.
|
|
This modifies unescaping in houdini_html_u.c rather than
the entity handling in inlines.c. Unlike the other,
this approach works also in e.g. link titles.
|
|
|
|
|
|
See commonmark/commonmark.js#177.
|
|
|
|
If CMARK_STATIC is on (default), link the executable with the static
library. This produces exactly the same result as compiling the library
sources again and linking with the object files.
If CMARK_STATIC is off, link the executable with the shared library.
This wasn't supported before and should be the preferred way to
package cmark on Linux distros.
Building only a shared library and a statically linked executable
isn't supported anymore but this doesn't seem useful.
|
|
A setext header line after a link reference should not
create a header, according to the spec.
See commonmark/commonmark-spec#395.
|
|
URL-escape special characters when escape mode is URL,
and not otherwise.
Entity-escape control characters (< 0x20) in non-literal
escape modes.
|
|
For markdown content, e.g., in other contexts we want some
kind of escaping, not a literal newline.
|
|
to conform with spec change.
|
|
|
|
Closes #290.
|
|
Fix cmake warning about CMP0048, again
|
|
A link destination can't start with `<` unless it is
an angle-bracket link that also ends with `>`.
(If your URL really starts with `<`, URL-escape it.)
|
|
both have lengths that are multiples of 3.
See commonmark/commonmark#528.
|
|
Closes #287.
|
|
|
|
It doesn't do anything; this is documented.
|
|
It is deprecated in CMake 3.0, the replacement is to set the
CXX_VISIBILITY_PRESET (or in our case C_VISIBILITY_PRESET) and
VISIBILITY_INLINES_HIDDEN properties of the target.
We're already setting them by setting the CMake variables anyway, so the
call can be removed.
|
|
Removes CMARK_OPT_SAFE from options.
Adds CMARK_OPT_UNSAFE, with the opposite meaning.
The new default behavior is to suppress raw HTML and
potentially dangerous links. The CMARK_OPT_UNSAFE
option has to be set explicitly to prevent this.
--------------------------------------------------------
NOTE: This change will require modifications in
bindings for cmark and in most libraries and programs
that use cmark.
--------------------------------------------------------
Closes #239, #273.
Borrows heavily from @kivikakk's patch in github/cmark-gfm#123.
|
|
Check for empty buffer when rendering
|
|
|
|
Keep track of the last position where a thematic break
failed to match on a line, to avoid rescanning unnecessarily.
See commonmark/cmark#284.
|
|
|
|
As with other static functions.
|
|
Use this to avoid unnecessary recursion in ends_with_blank_line.
Closes #284.
|
|
to avoid unnecessary repetition. Once we settle
whether a list item ends in a blank line, we don't
need to revisit this in considering parent list items.
See commonmark/cmark#284.
|
|
In accord with spec change.
|
|
|
|
|
|
We can't rely on anything in `subj` since it's been modified while parsing the
subject and could represent line info from a future line. This is simple and
works.
|
|
Fixes jgm/pandoc#5033.
|
|
|
|
This is needed for round-trip tests.
|
|
|
|
Add xml:space="preserve" in XML output when appropriate
|
|
Closes #263.
|
|
Newer versions of CMake attempt to query the system for information about the VS
2017 installation. Unfortunately, this query fails on non-Windows systems when
cross-compiling:
cmake_host_system_information does not recognize <key> VS_15_DIR
CMake will not find these system libraries on non-Windows hosts anyways, and we
were silencing the warnings, so simply omit the installation when
cross-compiling to Windows.
|
|
|
|
These affect both parsing and writing commonmark.
|
|
With current HTML escaping, sometimes we may produce an XML tag like
<code_block> </code_block>
Many XML parsers consider these spaces insignificant and strip them
out but we need this. There's actually a test case like this in
spec.txt (search "A code block can have all empty lines as its
content:") and without proper hinting, an external xml->html converter
will fail the spec.
XML standard covers this case. If xml:space is "preserve", then
whitespaces are significant and should be kept. Add this hint for
text, code, code_block, html_inline and html_block tags.
|
|
Added regression test.
See commonmark/CommonMark#527.
|
|
We were needlessly redoing things we'd already done.
Now we skip the work if the first nonspace is greater
than the current offset.
This fixes pathological slowdown with deeply nested
lists (#255). For N = 3000, the time goes from over
17s to about 0.7s.
Thanks to @mity for diagnosing the problem.
|