mirror of
https://github.com/progsource/maddy.git
synced 2026-03-25 16:00:39 +01:00
Compare commits
8 Commits
28e9a22f9c
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dcdbb50be | ||
|
|
07dde0c630 | ||
|
|
b2694f263d | ||
|
|
5f1f962e22 | ||
|
|
db875f74b8 | ||
|
|
441ba25550 | ||
|
|
9143754a23 | ||
|
|
de67274233 |
3
.github/ISSUE_TEMPLATE/cpp-bug-report.yml
vendored
3
.github/ISSUE_TEMPLATE/cpp-bug-report.yml
vendored
@@ -37,7 +37,8 @@ body:
|
|||||||
label: maddy version
|
label: maddy version
|
||||||
description: What version of maddy are you using?
|
description: What version of maddy are you using?
|
||||||
options:
|
options:
|
||||||
- 1.5.0 (latest)
|
- 1.6.0 (latest)
|
||||||
|
- 1.5.0
|
||||||
- 1.4.0
|
- 1.4.0
|
||||||
- 1.3.0
|
- 1.3.0
|
||||||
- 1.2.1
|
- 1.2.1
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ body:
|
|||||||
label: maddy version
|
label: maddy version
|
||||||
description: What version of maddy are you using?
|
description: What version of maddy are you using?
|
||||||
options:
|
options:
|
||||||
- 1.5.0 (latest)
|
- 1.6.0 (latest)
|
||||||
|
- 1.5.0
|
||||||
- 1.4.0
|
- 1.4.0
|
||||||
- 1.3.0
|
- 1.3.0
|
||||||
- 1.2.1
|
- 1.2.1
|
||||||
|
|||||||
3
.github/workflows/create-release-package.yml
vendored
3
.github/workflows/create-release-package.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: lukka/get-cmake@latest
|
- uses: lukka/get-cmake@latest
|
||||||
with:
|
with:
|
||||||
cmakeVersion: "~3.25.0" # <--= optional, use most recent 3.25.x version
|
cmakeVersion: "~3.25.0" # <--= optional, use most recent 3.25.x version
|
||||||
@@ -28,6 +28,7 @@ jobs:
|
|||||||
- name: Get current tag message
|
- name: Get current tag message
|
||||||
id: tag-message
|
id: tag-message
|
||||||
run: |
|
run: |
|
||||||
|
git fetch --tags --force
|
||||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
TAG_NAME=${GITHUB_REF#refs/tags/}
|
||||||
echo "TAG_NAME: $TAG_NAME"
|
echo "TAG_NAME: $TAG_NAME"
|
||||||
TAG_MESSAGE=$(git tag -l --format='%(contents)' "$TAG_NAME")
|
TAG_MESSAGE=$(git tag -l --format='%(contents)' "$TAG_NAME")
|
||||||
|
|||||||
4
.github/workflows/run-checks.yml
vendored
4
.github/workflows/run-checks.yml
vendored
@@ -11,10 +11,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.8'
|
python-version: '3.8'
|
||||||
|
|
||||||
|
|||||||
29
.github/workflows/run-tests.yml
vendored
29
.github/workflows/run-tests.yml
vendored
@@ -9,29 +9,38 @@ jobs:
|
|||||||
test-on-ubuntu:
|
test-on-ubuntu:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: lukka/get-cmake@latest
|
- uses: lukka/get-cmake@latest
|
||||||
with:
|
with:
|
||||||
cmakeVersion: "~3.25.0" # <--= optional, use most recent 3.25.x version
|
cmakeVersion: "~3.25.0"
|
||||||
ninjaVersion: "^1.11.1" # <--= optional, use most recent 1.x version
|
ninjaVersion: "^1.11.1"
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
cd tmp
|
cd tmp
|
||||||
cmake -DMADDY_BUILD_WITH_TESTS=ON ..
|
cmake -DMADDY_BUILD_WITH_TESTS=ON -DCMAKE_INSTALL_PREFIX=./install ..
|
||||||
make -j4
|
make -j4
|
||||||
|
make install
|
||||||
- name: run tests
|
- name: run tests
|
||||||
run: |
|
run: |
|
||||||
./build/MaddyTests
|
./build/MaddyTests
|
||||||
|
- name: test find_package
|
||||||
|
run: |
|
||||||
|
cd tests/cmake/find_package
|
||||||
|
mkdir tmp
|
||||||
|
cd tmp
|
||||||
|
cmake -DCMAKE_PREFIX_PATH=../../../tmp/install ..
|
||||||
|
make -j4
|
||||||
|
./maddy_find_package_example
|
||||||
|
|
||||||
test-on-windows:
|
test-on-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: lukka/get-cmake@latest
|
- uses: lukka/get-cmake@latest
|
||||||
with:
|
with:
|
||||||
cmakeVersion: "~3.25.0" # <--= optional, use most recent 3.25.x version
|
cmakeVersion: "~3.25.0"
|
||||||
ninjaVersion: "^1.11.1" # <--= optional, use most recent 1.x version
|
ninjaVersion: "^1.11.1"
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
@@ -45,11 +54,11 @@ jobs:
|
|||||||
test-on-osx:
|
test-on-osx:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
- uses: lukka/get-cmake@latest
|
- uses: lukka/get-cmake@latest
|
||||||
with:
|
with:
|
||||||
cmakeVersion: "~3.25.0" # <--= optional, use most recent 3.25.x version
|
cmakeVersion: "~3.25.0"
|
||||||
ninjaVersion: "^1.11.1" # <--= optional, use most recent 1.x version
|
ninjaVersion: "^1.11.1"
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
mkdir tmp
|
mkdir tmp
|
||||||
|
|||||||
4
.github/workflows/update-dependencies.yml
vendored
4
.github/workflows/update-dependencies.yml
vendored
@@ -16,10 +16,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: '3.11'
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ maddy uses [semver versioning](https://semver.org/).
|
|||||||
|
|
||||||
## Upcoming
|
## Upcoming
|
||||||
|
|
||||||
|
* ...
|
||||||
|
|
||||||
|
## version 1.6.0 2025-07-26
|
||||||
|
|
||||||
*  Added CMake install and find_package() support.
|
*  Added CMake install and find_package() support.
|
||||||
*  Script to update maddy version number in all files.
|
*  Script to update maddy version number in all files.
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.25)
|
cmake_minimum_required(VERSION 3.25)
|
||||||
|
|
||||||
project(maddy VERSION 1.5.0) # MADDY_VERSION_LINE_REPLACEMENT
|
project(maddy VERSION 1.6.0) # MADDY_VERSION_LINE_REPLACEMENT
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# maddy
|
# maddy
|
||||||
|
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://semver.org/) <!-- MADDY_VERSION_LINE_REPLACEMENT -->
|
[](https://semver.org/) <!-- MADDY_VERSION_LINE_REPLACEMENT -->
|
||||||
|
|
||||||
maddy is a C++ Markdown to HTML **header-only** parser library.
|
maddy is a C++ Markdown to HTML **header-only** parser library.
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
static const std::string& version()
|
static const std::string& version()
|
||||||
{
|
{
|
||||||
static const std::string v = "1.5.0"; // MADDY_VERSION_LINE_REPLACEMENT
|
static const std::string v = "1.6.0"; // MADDY_VERSION_LINE_REPLACEMENT
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
8
tests/cmake/find_package/CMakeLists.txt
Normal file
8
tests/cmake/find_package/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# This project is licensed under the MIT license. For more information see the
|
||||||
|
# LICENSE file.
|
||||||
|
cmake_minimum_required(VERSION 3.25)
|
||||||
|
|
||||||
|
find_package(maddy REQUIRED)
|
||||||
|
|
||||||
|
add_executable(maddy_find_package_example main.cpp)
|
||||||
|
target_link_libraries(maddy_find_package_example PRIVATE maddy::maddy)
|
||||||
25
tests/cmake/find_package/main.cpp
Normal file
25
tests/cmake/find_package/main.cpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* This project is licensed under the MIT license. For more information see the
|
||||||
|
* LICENSE file.
|
||||||
|
*
|
||||||
|
* This file is a tiny example project to test if find_package works correctly.
|
||||||
|
*/
|
||||||
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "maddy/parser.h"
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
std::shared_ptr<maddy::Parser> parser = std::make_shared<maddy::Parser>();
|
||||||
|
|
||||||
|
std::stringstream markdownStream;
|
||||||
|
markdownStream << "# Hello World\n"
|
||||||
|
<< "This is a **bold** text and this is *italic* text.\n";
|
||||||
|
|
||||||
|
std::cout << parser->Parse(markdownStream) << std::endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -70,6 +70,11 @@ def format_files(dry_run):
|
|||||||
files_to_format = []
|
files_to_format = []
|
||||||
for pattern in patterns:
|
for pattern in patterns:
|
||||||
matched_files = glob.glob(pattern, recursive=True)
|
matched_files = glob.glob(pattern, recursive=True)
|
||||||
|
|
||||||
|
for file in matched_files:
|
||||||
|
if '\/tmp\/' in file or '\\tmp\\' in file:
|
||||||
|
matched_files.remove(file)
|
||||||
|
|
||||||
files_to_format.extend(matched_files)
|
files_to_format.extend(matched_files)
|
||||||
|
|
||||||
if not files_to_format:
|
if not files_to_format:
|
||||||
|
|||||||
Reference in New Issue
Block a user