mirror of
https://github.com/progsource/maddy.git
synced 2026-03-25 07:50:39 +01:00
Compare commits
1 Commits
master
...
fix-one-li
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddd965e9fc |
2
.github/workflows/create-release-package.yml
vendored
2
.github/workflows/create-release-package.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~3.25.0" # <--= optional, use most recent 3.25.x version
|
||||
|
||||
2
.github/workflows/run-checks.yml
vendored
2
.github/workflows/run-checks.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
|
||||
6
.github/workflows/run-tests.yml
vendored
6
.github/workflows/run-tests.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
test-on-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~3.25.0"
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
test-on-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~3.25.0"
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
test-on-osx:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: "~3.25.0"
|
||||
|
||||
2
.github/workflows/update-dependencies.yml
vendored
2
.github/workflows/update-dependencies.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
|
||||
@@ -14,6 +14,7 @@ maddy uses [semver versioning](https://semver.org/).
|
||||
|
||||
## Upcoming
|
||||
|
||||
*  One-liner quote is not producing any output.
|
||||
* ...
|
||||
|
||||
## version 1.6.0 2025-07-26
|
||||
|
||||
@@ -99,6 +99,8 @@ public:
|
||||
this->childParser = nullptr;
|
||||
}
|
||||
|
||||
this->finishQuote(finish);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -107,11 +109,7 @@ public:
|
||||
this->parseLine(line);
|
||||
}
|
||||
|
||||
if (finish)
|
||||
{
|
||||
this->result << "</blockquote>";
|
||||
this->isFinished = true;
|
||||
}
|
||||
this->finishQuote(finish);
|
||||
|
||||
this->result << line;
|
||||
}
|
||||
@@ -145,6 +143,15 @@ protected:
|
||||
private:
|
||||
bool isStarted;
|
||||
bool isFinished;
|
||||
|
||||
void finishQuote(bool finish)
|
||||
{
|
||||
if (finish)
|
||||
{
|
||||
this->result << "</blockquote>";
|
||||
this->isFinished = true;
|
||||
}
|
||||
}
|
||||
}; // class QuoteParser
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -21,6 +21,18 @@ TEST(MADDY_PARSER, ItShouldParse)
|
||||
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)
|
||||
{
|
||||
auto config = std::make_shared<maddy::ParserConfig>();
|
||||
|
||||
Reference in New Issue
Block a user