Support unnumbered named Anlagen; strip control characters
Investigating "Anlagen as amendment target" corrected the diagnosis from
yesterday: Anlagen are supported. In gii-XML they are norms of their own
("Anlage 8", "Anhang"), Stelle.anlagenEnbez() resolves them, and the GEG
sample applies annex-targeted commands — only two of its fifty manual
entries touch annexes, both for content reasons.
What actually failed in Berlin was narrower, and is fixed:
* A law with a single annex names it after the provision it belongs to
("Die Anlage zu § 2 Absatz 4 Satz 1"). StellenParser demanded a
number after "Anlage" and rejected the phrase, so the article's frame
command went unrecognised and its items lost their context. The
annex now carries the designation "Anlage", like "Anhang". The naming
suffix is skipped deliberately: read along, the "§ 2" inside it would
become the target and the wrong norm would be amended.
* C0 control characters are now stripped. Berlin's enumeration indent
carries a U+0007 that sits invisibly in front of the command and made
its start-of-line anchor miss.
* Command verbs torn apart by a stray space in the official typesetting
("ein gefügt" for "eingefügt") are rejoined, restricted to sequences
that are not valid German word order.
Three of Article 1's four commands are now recognised. The fourth places
the new unit by a word anchor ("Vor den Wörtern … wird folgender Absatz 5
eingefügt"), which StrukturEinfuegung cannot express; that and the
inability of the plain-text stem format to carry an Anlage at all are
recorded in Landesrecht-Beispiele.adoc.
231 tests green; all pinned figures unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Change-Id: Ic5804bf343dd5d8ce435c07b8f882ca0372890d2
7 files changed