Skip to content

Fixes#24

Merged
devcrocod merged 3 commits into
masterfrom
fixes
May 12, 2026
Merged

Fixes#24
devcrocod merged 3 commits into
masterfrom
fixes

Conversation

@devcrocod
Copy link
Copy Markdown
Owner

devcrocod added 3 commits May 12, 2026 00:38
parseDirective now requires both a `<!---` prefix AND a `-->` close on the
same line, and only accepts the four known directive names (`IMPORT`,
`FUN`, `FUNS`, `END`). Anything else — `<!---TODO-->`, `<!---TOC -->`,
three-dash HTML comments, or an unclosed opener like `<!---FUN x` — returns
null and passes through as text.

Previously such lines either threw `IllegalArgumentException` from a
`require` check (unhandled, surfaced as a confusing Gradle stack trace) or
emitted noisy `Unrecognized directive` warnings. Also drops a latent bug
where the lazy `.+?` value matcher could grab the closing `-->` into the
value group.

Adds an `unknownDirectives` integration fixture covering TODO/TOC/FIXME/
generic-comment lines, a 3-dash close, and an unclosed opener alongside a
real FUN that still expands.
… and add integration fixture for samples outputs
@devcrocod devcrocod merged commit e26cd16 into master May 12, 2026
1 check passed
@devcrocod devcrocod deleted the fixes branch May 12, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fails on unrecognized directives

1 participant