Skip to content

Commit

Permalink
Support AsciiMath
Browse files Browse the repository at this point in the history
  • Loading branch information
lchen198 committed Jul 25, 2021
1 parent e5f2599 commit 251eb86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The Built-in Calendar
* Each WikiPage has a reverse index. You can use this feature to group pages by tags.
* An [index page](http://127.0.0.1:8000/cgi-bin/wypyplus.py?p=All&q=f) to show all your files in sorted order.
* AutoSave after 30 minutes of editing.
* Display [AsciiMath](http://asciimath.org) notations.

<p align="center">
<img src="example2.png">
Expand Down
4 changes: 2 additions & 2 deletions cgi-bin/wypyplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
'find':('<h1>Links: %s</h1>'%fs(n))+fs('{{\n* %s\n}}'%'\n* '.join(sorted([d for d in os.listdir('w/') if n == "All" or load(d).count(n)])))
}.get(m),lambda f=f:`(os.getenv("REQUEST_METHOD")!="POST") or ('t' in f or (os.remove('w/'+y) and False))\
and open('w/'+y,'w').write(f['t'][0])`+`sys.stdout.write("Content-type: text/html; charset=utf-8\r\n\r\n"\
"<head><meta content='width=device-width, initial-scale=1' name='viewport'><link rel='stylesheet' href='../sakura.css'>\
</script></head><title>%s</title>"%y+do({'e':'edit','f':'find'}.get(f.get('q',[None])[0],'get'),y))`;
'<head><meta content="width=device-width, initial-scale=1" name="viewport"><link rel="stylesheet" href="../sakura.css"></script>\
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js?config=AM_CHTML"></script></head><title>%s</title>'%y+do({'e':'edit','f':'find'}.get(f.get('q',[None])[0],'get'),y))`;
(__name__=="__main__") and main()
6 changes: 6 additions & 0 deletions w/DemoPage
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i

This is a **Bold** text!

## Ascii Math

`
x=(-b +- sqrt(b^2 – 4ac))/(2a)
`

## Links

List all files in this wiki: [All](http://127.0.0.1:8000/cgi-bin/wypyplus.py?p=All&q=f)
Expand Down

0 comments on commit 251eb86

Please sign in to comment.