diff options
author | Oxbian <oxbian@mailbox.org> | 2024-12-02 15:04:18 -0500 |
---|---|---|
committer | Oxbian <oxbian@mailbox.org> | 2024-12-02 15:04:18 -0500 |
commit | 65b69b5efab3bb52555080b484bc1e52ceca20f0 (patch) | |
tree | 475be0e052d4fbb44c272ba8e2225c8b8001e396 | |
parent | 572b4ef237de3e98fd94ba96800b4fffb73233fa (diff) | |
download | blog-generator-main.tar.gz blog-generator-main.zip |
fix: bold in text not working + sorted data not passed to functionsmain
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | generator.py | 4 | ||||
-rw-r--r-- | markdown_parser.py | 7 |
3 files changed, 6 insertions, 12 deletions
@@ -78,13 +78,6 @@ tags: new year, happy, test This project only has `python-dotenv` as dependencies for loading environment variable into python. -## Trouble & help - -If you have any troube you can contact me by email, matrix, or open an issue. If you are a beginner prefer using email, thanks. - -- Email: oxbian.noch@simplelogin.com -- Matrix: @oxbian:matrix.org - ## License This project is under the GPLV3 license. You can use, modify, as long as the copy is opensource under the GPLV3 too. diff --git a/generator.py b/generator.py index e55c949..bcc9282 100644 --- a/generator.py +++ b/generator.py @@ -179,8 +179,8 @@ if __name__ == "__main__": # Generating atom feed print(f"{color['green']}Generating RSS / Atom feed in {lang} {color['end']}") - generate_atom_feed(data, env_vars) + generate_atom_feed(sorted_data, env_vars) # Generating index print(f"{color['green']}Generating main page in {lang} :{color['end']}") - generate_index(data, env_vars) + generate_index(sorted_data, env_vars) diff --git a/markdown_parser.py b/markdown_parser.py index cb66476..dc61e98 100644 --- a/markdown_parser.py +++ b/markdown_parser.py @@ -11,12 +11,13 @@ def parse_line(line): html.escape(line) # Checking if there is strong or emphasized - while "*" in line: - line = line.replace("*", "<em>", 1) - line = line.replace("*", "</em>", 1) while "**" in line: line = line.replace("**", "<strong>", 1) line = line.replace("**", "</strong>", 1) + while "*" in line: + line = line.replace("*", "<em>", 1) + line = line.replace("*", "</em>", 1) + # Checking if there is image while "![" in line and "]" in line: |