To solve both issues, I'd like to propose an extension that allows "simply" using braces (or some other punctuation pair) to allow nesting, with an option to tag/add attributes to the contents like that.
In some more details:
- The format would just be `{ content }` or `{ content }{#id .class}` to be able to add attributes to a block.
- If the content between braces contains new lines, the first new line sets the indentation level for the rest.
There could be a point to be made to put the attributes before the content, but I'm not sure what kind of form that would take. Maybe something like `#id{content}{.class}` could be used: only the identifier can come before the content, and has to be a valid identifier (alphanum, underscore, dash)?
I think this syntax would not clash with that much of what's already existing: mostly just the already existing attribute syntax. A potential solution to that would be to use a different character pair for nested blocks, but `[]` is already used a lot.
I've looked at implementing that as a custom filter, but I think it has to be an extension baked in pandoc itself.
Cheers