Re-visit [example] and [code] attribute logic
Closed this issue · 2 comments
philosowaffle commented
Should be possible to remove the nested -[code] attribute, and simply state +[code] as a primary attribute. We should also consider keeping +[example] as a reserved word that processes a block the same way as [code], that way an example can be multi-lined.
philosowaffle commented
New thoughts:
Every attribute should support multi-line content.
+[title]: myTitle
+[description]: {
multi-line content goes here
if docme does not find a nested -[attribute] then it considers
it multi-line content
}
+[input]: {
-[subAttribute]: regular, single-line nested attribute
-[varName]: var description
-[idea]: we should remove the '->' syntax and just make the subAttribute be the var name
}
+[code]: {
code remains a reserved word since code will be formatted differently
than plain text, however it should be parse the same as plain text, it will
only be different in the output
}
This will allow us to limit the number of reserved words, keep a cleaner syntax, and provide more flexibility for the user.
philosowaffle commented