mirror of
https://github.com/neocities/neocities.git
synced 2025-07-20 17:46:05 +02:00
Implement ace editor for coding
This commit is contained in:
parent
d422795c04
commit
65bc388ee9
10 changed files with 77 additions and 41 deletions
|
@ -25,11 +25,10 @@ But this isn't!
|
|||
</div>
|
||||
|
||||
<script>
|
||||
function checkHomework(editor) {
|
||||
var html = editor.val()
|
||||
|
||||
function checkHomework() {
|
||||
var html = editor.getValue()
|
||||
/* TODO: Make .+ ignore any spaces or newlines or whatever. </a> lol </p> is fine too. */
|
||||
var match = '<html>.+<body>.+<h1>.+</h1>.+<p>.+<a.+href=".+">.+</a>[^.+]?</p>.+</body>.+</html>'
|
||||
var match = '<html.+>.+<body>.+<h1>.+</h1>.+<p>.+<a.+href=".+">.+</a>[^.+]?</p>.+</body>.+</html>'
|
||||
var re = new XRegExp(match, 'gis')
|
||||
|
||||
if(html.match(re) === null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue