|
| Summary: |
Inconsistencies between UniAst and Macro AST |
| Issue Type: |
Bug |
| Affects Versions: |
18.1.0 |
| Assignee: |
Unassigned |
| Components: |
Node - UniAST - API |
| Created: |
24/Feb/26 15:41 |
| Priority: |
Major |
| Reporter: |
Marius Dumitru Florea |
| Description: |
I noticed there are differences between how blocks are defined in UniAst and Macro Ast, which I find surprising. I understand why Macro Ast needs to define its own types, but I was expecting these duplicated types to have the same structure / constraints as the types defined by UniAst. I mean, I don't see why a specific type of block would have different constraints when outside a macro than when inside a macro. Here are the differences I noticed:
- lists have a numbered property inside macros, but not outside
- break block is not supported inside macros
- macroBlock has a call property (with id, params and body) outside macros and the name and params properties inside macros. Why the difference and why the limitation that a macro (call) block can't specify a body when inside another macro?
- block styles have cssClasses inside a macro but not outside
- list items have a number property outside macros but not inside
- list items can have block level children outside macros but not inside => this is quite surprising because I was expecting to have more freedom / fewer restrictions inside the read-only output of a macro. You can edit lists with block level content, but you can't have a macro generating lists with block level content.
- the image can have caption and styles outside a macro but not inside, again very counter-intuitive to me
- table header cell can have rowspan and colspan outside a macro but not inside
- inline image is allowed outside macros but not inside
- inlineMacro has the same problem as macroBlock: call(id, params, body) vs. name, params
Are these differences by design, for a good reason, or are they just the result of code duplication that left the Macro Ast out of sync with UniAst? |
|