Fix stupid

This commit is contained in:
relt-1
2023-09-26 22:30:59 +02:00
parent 7af6a4b150
commit 3f702463ee
2 changed files with 5 additions and 4 deletions

View File

@@ -72,10 +72,11 @@ def FindFile(name):
def ConvertToHtml(fpath):
with open(fpath,"r") as f:
rawmarkdown = f.read().replace("\r\n","\n")
smalls = re.findall(r"^\$\_SMALL\s[\s\S]+\s\_\$$",rawmarkdown,re.MULTILINE)
smalls = re.findall(r"^\$\_SMALL\s[\s\S]+?\s\_\$$",rawmarkdown,re.MULTILINE)
for small in smalls:
print(small)
rawmarkdown = rawmarkdown.replace(small, "<small style=\"position:relative; top:8px;\">"+small[8:-3]+"</small>")
frames = re.findall(r"^\$_FRAME\s[\S\s]+\s_\$$",rawmarkdown,re.MULTILINE)
frames = re.findall(r"^\$_FRAME\s[\S\s]+?\s_\$$",rawmarkdown,re.MULTILINE)
for frame in frames:
framed_string = frame[8:-3]
rawmarkdown = rawmarkdown.replace(frame,f"<div class=\"framed\"><div class=\"framed\">{framed_string}</div></div>")

View File

@@ -448,7 +448,7 @@ th, td
<p>Let's say that you have a library called "MyLib.nut" inside a mod called "MyMod". This is what it contains:</p>
<p><small style="position:relative; top:8px;">MyMod/MyLib.nut _$</p>
<p><small style="position:relative; top:8px;">MyMod/MyLib.nut</small></p>
<pre><code>class AdditionClass
{
@@ -463,7 +463,7 @@ Addition &lt;- AdditionClass() -- Exports can only use global variables!
<p>Now to export the <code>Addition</code> object, pass them to the <code>export()</code> function at the end of the file.</p>
<p>$_SMALL MyMod/MyLib.nut</small></p>
<p><small style="position:relative; top:8px;">MyMod/MyLib.nut</small></p>
<pre><code>export(Addition);
</code></pre>