📜 ⬆️ ⬇️

Small HTML preprocessor

It was decided to write an HTML preprocessor that would simply remove the closing tags and use the pythonium syntax of determining the position of the block.

To compare:

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>HTML Document</title> </head> <body> <p> <b>    , <i></i> </b> </p> </body> </html> 

Could be rewritten as:

 <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>HTML Document <body> <p> <b>    , <i> 

The second, in my opinion, is shorter, faster typed, easier to read and correct.
')
Translator code here , instructions attached.

Source: https://habr.com/ru/post/313178/


All Articles