Styling + chapter 1
This commit is contained in:
@@ -59,7 +59,14 @@ find . -type f -name "*.md" -print0 | while IFS= read -r -d '' mdfile; do
|
||||
{
|
||||
echo "$HTML_BEGIN"
|
||||
sed -E 's/href="(\.\/[^.]+)"/href="\1\/"/g' "$html_raw" | \
|
||||
python3 -c "import sys, re; print(re.sub(r'href=\"([^\"]+)\"', lambda m: 'href=\"' + m.group(1).replace('?', '%3F').replace('!', '%21') + '\"', sys.stdin.read()), end='')"
|
||||
sed -E 's/href="([^"]*)\.md"/href="\1.html"/g' | \
|
||||
python3 -c "
|
||||
import sys, re
|
||||
text = sys.stdin.read()
|
||||
text = re.sub(r'<p><em>(.*?)</em></p>', r'<p class=\"thought\"><em>\1</em></p>', text, flags=re.DOTALL)
|
||||
text = re.sub(r'href=\"([^\"]+)\"', lambda m: 'href=\"' + m.group(1).replace('?', '%3F').replace('!', '%21') + '\"', text)
|
||||
print(text, end='')
|
||||
"
|
||||
echo "$HTML_END"
|
||||
} > "$html_final"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user