reshape / standard

a standard plugin pack with modern template language features
Other
17 stars 6 forks source link

Need more info in docs or change of behaviour #9

Closed kbytin closed 7 years ago

kbytin commented 7 years ago
ul
  li test
    span hello
ul
  li
    span hello

The first Ul have 2 elements li and span, and in the second ul span is nested under li (which is correct)

jescalan commented 7 years ago

So the basic reason why this doesn't work is that you have two options when it comes to putting content inside a tag. If the tag only contains text content, you can drop the content right after the tag without having to nest and indent as such:

p here's my content

However, if you need to nest elements inside a tag, you need to indent, like this:

p
  span some content
  strong wow, bold content

If you need to mix text content and tags, you can use a pipe for this:

p
  | text content here
  span special content in a span!
  | and more text content

This works exactly the same way in jade, which many sugarml users have experience with. However, I do understand if the docs don't make this clear and would be happy to try to improve them. Does the explanation I put here in this comment make sense, and make it more clear for you? If so, I'll add something similar to the site 😁

kbytin commented 7 years ago

Yep, it is clear now. Thanx