-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Instead of writing a chain of multiple non-breaking-space [sp]
or newline [nl]
nodes:
[sp][sp][sp]
[nl][nl]
we could instead adopt a multiplier-style syntax to indicate node repetitions:
[sp*3]
[nl*2]
Usually when one needs to use the [sp]
node is because a single space is not enough, so this notation would allow to save space by using a single node to represent multiple spaces. Probably the need for multiple [nl]
nodes is less frequent, since it's usually employed just to hard-break within a paragraph, but there might be cases where multiple newlines are needed — and, in any case, it might be worth supporting this notation for both nodes, for consistency sake.
Although this notation doesn't align with the general PML syntax adopted so far, IMO it makes sense in this context due to its simplicity and inactivity — since it resembles the customary multiplication syntax it's very easy to remember.
Both of these nodes are childless and don't support any type of attributes, which might further justify this notation applying to them as an exception to the rule.
The only other context where a similar notation might make sense it's table cells, where the [tc]
node could adopt the x*y
notation to indicate columns and rows spanning — e.g. [tc 2*3]
for a cell spanning two columns and three rows; [tc 4*0]
/[tc 4*]
for spanning four columns; [tc 0*5]
/[tc *5]
spanning five rows, etc.; where a zero-value can be simply omitted, since the position of the other value in respect to the asterisk clearly indicates whether it refers to a column (lhs) or a row (rhs).