Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new spoiler extension #28

Open
wants to merge 7 commits into
base: gfm
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ alltests.md
progit/
bench/benchinput.md
test/afl_results/

# Build directories for SwiftPM and Xcode
.swiftpm
.build
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ option(CMARK_TESTS "Build cmark-gfm tests and enable testing" ON)
option(CMARK_STATIC "Build static libcmark-gfm library" ON)
option(CMARK_SHARED "Build shared libcmark-gfm library" ON)
option(CMARK_LIB_FUZZER "Build libFuzzer fuzzing harness" OFF)
option(CMARK_THREADING "Add locks around static accesses via pthreads" OFF)

add_subdirectory(src)
add_subdirectory(extensions)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ mingw:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$(MINGW_INSTALLDIR) ;\
$(MAKE) && $(MAKE) install

man/man3/cmark-gfm.3: src/cmark-gfm.h | $(CMARK)
man/man3/cmark-gfm.3: src/include/cmark-gfm.h | $(CMARK)
python man/make_man_page.py $< > $@ \

archive:
Expand Down
66 changes: 66 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "cmark-gfm",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "cmark-gfm",
targets: ["cmark-gfm"]),
.library(
name: "cmark-gfm-extensions",
targets: ["cmark-gfm-extensions"]),
.executable(
name: "cmark-gfm-bin",
targets: ["cmark-gfm-bin"]),
.executable(name: "api_test",
targets: ["api_test"])
],
targets: [
.target(name: "cmark-gfm",
path: "src",
exclude: [
"scanners.re",
"libcmark-gfm.pc.in",
"config.h.in",
"CMakeLists.txt",
"cmark-gfm_version.h.in",
"case_fold_switch.inc",
"entities.inc",
]
),
.target(name: "cmark-gfm-extensions",
dependencies: [
"cmark-gfm",
],
path: "extensions",
exclude: [
"CMakeLists.txt",
"ext_scanners.re",
]
),
.target(name: "cmark-gfm-bin",
dependencies: [
"cmark-gfm",
"cmark-gfm-extensions",
],
path: "bin",
sources: [
"main.c",
]
),
.target(name: "api_test",
dependencies: [
"cmark-gfm",
"cmark-gfm-extensions",
],
path: "api_test",
exclude: [
"CMakeLists.txt",
]
)
]
)
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
cmark-gfm
=========

![Actions CI](https://github.com/github/cmark-gfm/actions/workflows/ci.yml/badge.svg)

`cmark-gfm` is an extended version of the C reference implementation of
[CommonMark], a rationalized version of Markdown syntax with a spec. This
repository adds GitHub Flavored Markdown extensions to
[the upstream implementation], as defined in [the spec].

Changes upstream in `cmark` will be pulled into this `cmark-gfm` project repository
as the upstream project evolves. The original `cmark` repository can be found here:
<https://github.com/commonmark/cmark>.

The rest of the README is preserved as-is from the upstream source. Note that
the library and binaries produced by this fork are suffixed with `-gfm` in
order to distinguish them from the upstream.

## License

The original `cmark` code is released under a BSD2 license. This same license
applies to the Swift code included in this `cmark-gfm` repository.

---

It provides a shared library (`libcmark`) with functions for parsing
Expand Down
7 changes: 4 additions & 3 deletions api_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ add_executable(api_test
main.c
)
include_directories(
${PROJECT_SOURCE_DIR}/src
${PROJECT_BINARY_DIR}/src
${PROJECT_BINARY_DIR}/extensions
${PROJECT_SOURCE_DIR}/src/include
${PROJECT_BINARY_DIR}/src/include
${PROJECT_SOURCE_DIR}/extensions/include
${PROJECT_BINARY_DIR}/extensions/include
)
if(CMARK_SHARED)
target_link_libraries(api_test libcmark-gfm-extensions libcmark-gfm)
Expand Down
2 changes: 1 addition & 1 deletion api_test/cplusplus.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <cstdlib>

#include "cmark-gfm.h"
#include <cmark-gfm.h>
#include "cplusplus.h"
#include "harness.h"

Expand Down
Loading