codelife icon indicating copy to clipboard operation
codelife copied to clipboard

add extra base rule for head/body as siblings (and not children of eachother)

Open davelandry opened this issue 8 years ago • 1 comments

davelandry avatar Oct 27 '17 22:10 davelandry

This relates to the HTML code validation rules that get run after a user submits their code. Currently there is no rule to check that the <head> and <body> elements appear side-by-side as children of the <html> tag instead of nested within each other.

All of the validation rules are defined in this file: https://github.com/CodeLifeOrg/codelife/blob/master/app/utils/codeValidation.js

And can be added to the base rules (required by default for any user submitted HTML code) here: https://github.com/CodeLifeOrg/codelife/blob/7d9cb41398255b4edd318eb071b334c63b38a16e/app/components/CodeEditor/CodeEditor.jsx#L230-L265

alexandersimoes avatar Sep 19 '19 16:09 alexandersimoes