ecmarkup icon indicating copy to clipboard operation
ecmarkup copied to clipboard

Feature request: support clause number permanence option

Open gesa opened this issue 2 months ago • 4 comments

A CLI option that makes the number attribute mandatory in every clause and throws if there's a missing (or duplicated, or out-of-order) clause. This would require authors to explicitly indicate to readers if a clause has been deleted between versions.

It would be imperfect—for example it wouldn't catch if the last subclause in a list vanished—but it would be a great move in the right direction for clause permanence across versions.

gesa avatar Oct 06 '25 15:10 gesa

Is the intent to have clause numbers not change across editions? 262 just renumbers everything when a clause is removed.

ljharb avatar Oct 06 '25 16:10 ljharb

That is the goal. It provides a more stable document for backwards and forwards compatible referencing.

I can dream of 262 publishing in this way, but don't worry that's not the point of this feature request. The point of this feature request is to provide the option for editors of other Ecma specifications.

gesa avatar Oct 06 '25 16:10 gesa

Why not generate/consume a persistent file mapping section IDs to clause numbers? New sections will get added to the mapping with clause numbers appropriate for their position, and deleted sections will continue to reserve a clause number in the mapping. The file can be version controlled in the repo with the spec document.

michaelficarra avatar Oct 07 '25 00:10 michaelficarra

Sure. I honestly care very little about the implementation. I would just really like this as an option for our documents as a good SDO citizen.

gesa avatar Oct 08 '25 12:10 gesa