mirror of
https://github.com/progsource/maddy.git
synced 2026-03-25 16:00:39 +01:00
Compare commits
5 Commits
1.6.0
...
fix-one-li
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddd965e9fc | ||
|
|
07dde0c630 | ||
|
|
b2694f263d | ||
|
|
5f1f962e22 | ||
|
|
db875f74b8 |
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@v5
|
||||||
- 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@v5
|
||||||
|
|
||||||
- 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'
|
||||||
|
|
||||||
|
|||||||
6
.github/workflows/run-tests.yml
vendored
6
.github/workflows/run-tests.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
test-on-ubuntu:
|
test-on-ubuntu:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: lukka/get-cmake@latest
|
- uses: lukka/get-cmake@latest
|
||||||
with:
|
with:
|
||||||
cmakeVersion: "~3.25.0"
|
cmakeVersion: "~3.25.0"
|
||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
test-on-windows:
|
test-on-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: lukka/get-cmake@latest
|
- uses: lukka/get-cmake@latest
|
||||||
with:
|
with:
|
||||||
cmakeVersion: "~3.25.0"
|
cmakeVersion: "~3.25.0"
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
test-on-osx:
|
test-on-osx:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
- uses: lukka/get-cmake@latest
|
- uses: lukka/get-cmake@latest
|
||||||
with:
|
with:
|
||||||
cmakeVersion: "~3.25.0"
|
cmakeVersion: "~3.25.0"
|
||||||
|
|||||||
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@v5
|
||||||
|
|
||||||
- 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,7 @@ maddy uses [semver versioning](https://semver.org/).
|
|||||||
|
|
||||||
## Upcoming
|
## Upcoming
|
||||||
|
|
||||||
|
*  One-liner quote is not producing any output.
|
||||||
* ...
|
* ...
|
||||||
|
|
||||||
## version 1.6.0 2025-07-26
|
## version 1.6.0 2025-07-26
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ public:
|
|||||||
this->childParser = nullptr;
|
this->childParser = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->finishQuote(finish);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,11 +109,7 @@ public:
|
|||||||
this->parseLine(line);
|
this->parseLine(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (finish)
|
this->finishQuote(finish);
|
||||||
{
|
|
||||||
this->result << "</blockquote>";
|
|
||||||
this->isFinished = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->result << line;
|
this->result << line;
|
||||||
}
|
}
|
||||||
@@ -145,6 +143,15 @@ protected:
|
|||||||
private:
|
private:
|
||||||
bool isStarted;
|
bool isStarted;
|
||||||
bool isFinished;
|
bool isFinished;
|
||||||
|
|
||||||
|
void finishQuote(bool finish)
|
||||||
|
{
|
||||||
|
if (finish)
|
||||||
|
{
|
||||||
|
this->result << "</blockquote>";
|
||||||
|
this->isFinished = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}; // class QuoteParser
|
}; // class QuoteParser
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -21,6 +21,18 @@ TEST(MADDY_PARSER, ItShouldParse)
|
|||||||
ASSERT_EQ(testHtml, output);
|
ASSERT_EQ(testHtml, output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(MADDY_PARSER, ItShouldParseOneLiner)
|
||||||
|
{
|
||||||
|
auto parser = std::make_shared<maddy::Parser>();
|
||||||
|
std::stringstream markdown("> This is a **test**");
|
||||||
|
|
||||||
|
const std::string output = parser->Parse(markdown);
|
||||||
|
|
||||||
|
ASSERT_EQ(
|
||||||
|
"<blockquote><p>This is a <strong>test</strong> </p></blockquote>", output
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(MADDY_PARSER, ItShouldParseWithBitwiseConfig)
|
TEST(MADDY_PARSER, ItShouldParseWithBitwiseConfig)
|
||||||
{
|
{
|
||||||
auto config = std::make_shared<maddy::ParserConfig>();
|
auto config = std::make_shared<maddy::ParserConfig>();
|
||||||
|
|||||||
Reference in New Issue
Block a user