From b7c22b3c7d785eace5cad9eb7fe8f3ba32f7ede2 Mon Sep 17 00:00:00 2001 From: relt-1 Date: Sat, 23 Sep 2023 17:00:30 +0200 Subject: [PATCH] More elaboration --- __main__.py | 8 ++++- dst/QScript/Introduction.html | 4 +-- dst/QScript/Lua/Classes.html | 19 ++++++----- dst/QScript/Lua/Exports.html | 6 ++-- dst/QScript/Lua/Imports.html | 11 ++++--- dst/QScript/Lua/Intro.html | 51 ++++++++++++++++++++++++++++++ dst/QScript/Lua/Objects.html | 6 ++-- dst/QScript/Tutorial/Chapter1.html | 14 ++++++-- dst/index.html | 4 +-- src/QScript/Lua/Classes.md | 13 +++++--- src/QScript/Lua/Exports.md | 2 ++ src/QScript/Lua/Imports.md | 5 ++- src/QScript/Lua/Intro.md | 5 +++ src/QScript/Lua/Objects.md | 2 ++ src/QScript/Tutorial/Chapter1.md | 9 ++++++ 15 files changed, 130 insertions(+), 29 deletions(-) create mode 100644 dst/QScript/Lua/Intro.html create mode 100644 src/QScript/Lua/Intro.md diff --git a/__main__.py b/__main__.py index a06ab86..7619eec 100644 --- a/__main__.py +++ b/__main__.py @@ -33,7 +33,13 @@ for root, subdirs, files in os.walk(src): fpath = os.path.join(root, file) with open(fpath,"r") as f: with open(dst+fpath[len(src):].replace(".md",".html"), "w") as r: - converted = mark.convert(f.read()) + rawmarkdown = f.read().replace("\r\n","\n") + smalls = re.findall(r"^\S+\n[( )\t]",rawmarkdown,re.MULTILINE) + for small in smalls: + smallstring = small.strip() + whitespace = small[len(smallstring):] + rawmarkdown = rawmarkdown.replace(small, ""+smallstring+"\n"+whitespace) + converted = mark.convert(rawmarkdown) links = re.findall(r'\[\[.+\]\]', converted) for link in links: converted = converted.replace(link, ""+link[2:-2].split("/")[-1]+"") diff --git a/dst/QScript/Introduction.html b/dst/QScript/Introduction.html index 7f7f3ef..56c3f5c 100644 --- a/dst/QScript/Introduction.html +++ b/dst/QScript/Introduction.html @@ -1,7 +1,7 @@ + +
+ + +
+
+

Lua Intro

+ +

The tutorial will assume that you already know the basics of Lua. If you do not know anything about it, then you can go to the official PIL

+ +

First, let's learn about Lua Classes

+ +
\ No newline at end of file diff --git a/dst/QScript/Lua/Objects.html b/dst/QScript/Lua/Objects.html index b4a3eea..e1efc08 100644 --- a/dst/QScript/Lua/Objects.html +++ b/dst/QScript/Lua/Objects.html @@ -1,7 +1,7 @@