Potential traps with my new markup language?

Something that really bothered me about XHTML and XML in general is why it is necessary to indicate which tag you are closing. Things like <b>bold <i>bold and italic</b> just italic</i>, in any case, are not legal. So, I think using {}makes more sense. Anyway, this is what I came up with:

doctype;
html
{
head
{
  title "my webpage"
javascript '''
// code here
// single quotes do not allow variable substitution, like PHP
// triple quotes can be used like Python
'''
}
body
{
  table {
     tr {
        td "cell 1"
        td "cell 2"
        td @var|filter1|filter2:arg
     }
  }
  p "variable @var in a string"
  p "variable @{var|withfilter}"
  input(type=password, value=secret); // attributes are specified like this
  br; // semi-colons are used on elements that don't have content
  p { "strings are" "automatically" "concatenated together" @andvars "too" }
}
}

, , (, td "cell 1" td ). , , , - . , Django's. , . , , , . , @ . $ PHP, jQuery , JS (, , !)

. HTML- , . "" , HTML-.

, ...

: .

+3
1

, TCL script.

, , - ( ) ( ) SGML.

- , , . , , .

, , , , VI Notepad, ...

+4

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


All Articles