mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
fix for tutorial not accepting spaces in link text
This commit is contained in:
parent
2e2ddec790
commit
0fe2bcb649
2 changed files with 2 additions and 2 deletions
|
@ -24,6 +24,7 @@ end
|
||||||
|
|
||||||
get '/tutorial/:section/?' do
|
get '/tutorial/:section/?' do
|
||||||
require_login
|
require_login
|
||||||
|
not_found unless %w{html css js}.include?(params[:section])
|
||||||
redirect "/tutorial/#{params[:section]}/1"
|
redirect "/tutorial/#{params[:section]}/1"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,7 @@
|
||||||
notok('You need to add an <strong>href</strong> to your <strong>a</strong> tag, like: <strong>href="http://neocities.org"</strong>')
|
notok('You need to add an <strong>href</strong> to your <strong>a</strong> tag, like: <strong>href="http://neocities.org"</strong>')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(a.text() == '' || !a.text().match(/[^\s]+/)) {
|
||||||
if(a.text() == '' || a.text().match(/\s+/)) {
|
|
||||||
notok('You need to add a name for your link, which is the text between the <a> tag, and the closing tag </a>')
|
notok('You need to add a name for your link, which is the text between the <a> tag, and the closing tag </a>')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue