diff --git a/README.md b/README.md index 2e91934..3c81e3d 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,15 @@ Static Website Generator (swg) is a lightweight utility that does exactly what's written on the tin. This utility aims to be a simple yet painless program to automate the boring work of static website development. -This utility was created originally for the development of version 3 of the -luca0N! website. +This utility was created originally for the [development of version 3 of the +luca0N! website](https://git.luca0n.com/luca0N/luca0N-website). -Static Website Generator is very limited and is not intended for anything other -than simple static websites. Some features are still in the works. +Static Website Generator is currently under development, and production usage +is discouraged. Expect bugs and bad unoptimized performance. + +## License and copyright notice + +Copyright © 2022–2023 luca0N! This is free software. You are allowed to modify, redistribute and distribute modified versions of this software under the terms of the GNU Lesser General @@ -18,7 +22,3 @@ Inc. [Read the LICENSE file for further information.](LICENSE) ## Documentation Coming soon! - -
- -Copyright © 2022–2023 luca0N! diff --git a/src/Common.hxx b/src/Common.hxx index fde210c..a4a2b1b 100644 --- a/src/Common.hxx +++ b/src/Common.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 luca0N! + * Copyright (C) 2022-2023 luca0N! * * This file is part of Static Website Generator (swg). * @@ -25,7 +25,7 @@ #define PROGRAM_VERSION 1 #define PROGRAM_VERSION_NAME "0.1-dev" #define PROGRAM_COPYRIGHT "luca0N!" -#define PROGRAM_COPYRIGHT_YEARS "2022" +#define PROGRAM_COPYRIGHT_YEARS "2022-2023" #define RETURN_SUCCESSFUL 0 diff --git a/src/MarkdownParser.cxx b/src/MarkdownParser.cxx index a531677..9abc2bc 100644 --- a/src/MarkdownParser.cxx +++ b/src/MarkdownParser.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 luca0N! + * Copyright (C) 2022-2023 luca0N! * * This file is part of Static Website Generator (swg). * @@ -102,9 +102,10 @@ std::string make_html(std::filesystem::path const &path) { // End ul tag if it's active and a new line doesn't contain an // item. - if (tag_ul && newline && buf[0] != '-') { + if (tag_ul && newline && buf[0] != '-' && buf[0] == '\n') { tag_ul = false; - html += ""; + tag_li = false; + html += ""; } // Read character by character @@ -129,15 +130,14 @@ std::string make_html(std::filesystem::path const &path) { html += ">"; tag_h = 0; } - if (tag_li) html += "", tag_li = false; - html += '\n'; + if (!tag_li) + html += '\n'; break; } // Start paragraph if newline and no // special characters were matched. - - if (!tag_comment && (!tag_p && newline && x == 0 && + if (!tag_comment && !tag_ul && (!tag_p && newline && x == 0 && c != '#' && c != '-')) html += "

", tag_p = true; @@ -261,6 +261,10 @@ std::string make_html(std::filesystem::path const &path) { // Start unordered list tag if it's not active. if (!tag_ul) html += "