3 Commits

Author SHA1 Message Date
Petra Baranski
ddd965e9fc fix: one-liner quote parser does not give any output 2025-10-06 01:09:42 +02:00
Petra Baranski
07dde0c630 chore: update github templates 2025-10-05 15:44:00 +02:00
Petra Baranski
b2694f263d chore: fetch tags in the release job 2025-10-05 15:44:00 +02:00
6 changed files with 30 additions and 7 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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")

View File

@@ -14,6 +14,7 @@ maddy uses [semver versioning](https://semver.org/).
## Upcoming ## Upcoming
* ![**FIXED**](https://img.shields.io/badge/-FIXED-%23090) One-liner quote is not producing any output.
* ... * ...
## version 1.6.0 2025-07-26 ## version 1.6.0 2025-07-26

View File

@@ -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
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@@ -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>();