Skip to content

[core] Implement <esi:inline> element (#161)#270

Merged
s2x merged 1 commit into
mainfrom
feat/esi-inline-161
May 18, 2026
Merged

[core] Implement <esi:inline> element (#161)#270
s2x merged 1 commit into
mainfrom
feat/esi-inline-161

Conversation

@s2x
Copy link
Copy Markdown
Contributor

@s2x s2x commented May 18, 2026

Description

Implements the <esi:inline> element per the W3C ESI 1.0 specification. Content inside <esi:inline> is now rendered verbatim without further ESI processing — serving as an escape hatch for literal ESI markup in output.

Closes #161

Changes

  • mesi/inline.go (new) — processInlineBlock() extracts body content using quote-aware tag-end detection
  • mesi/parser.go — Added ESI_INLINE handling in MESIParse() and processAttemptContent() (same approach as ESI_VARS/ESI_TRY/ESI_CHOOSE)
  • mesi/parser_test.go — 8 test functions with 18 test cases covering:
    • Basic verbatim rendering
    • ESI markup escape hatch (include inside inline not processed)
    • HTML markup passthrough
    • Empty inline body
    • Inline with surrounding content
    • Attributes on inline tag
    • Inline inside esi:attempt and esi:except
    • Quote-aware tag extraction edge cases
    • Multi-byte UTF-8 preservation
  • tests/fixtures/ — 3 e2e test fixtures
  • docs/features.md — Updated feature matrix from ⚠️ to ✅

Verification

  • All existing tests pass
  • New unit tests pass
  • Code reviewed separately

- Add processInlineBlock() to extract body content verbatim
- Handle ESI_INLINE in MESIParse() and processAttemptContent()
- Add unit tests covering body rendering, ESI escape hatch, HTML,
  empty body, attributes, and integration with esi:try
- Add e2e test fixtures for inline passthrough
- Update feature matrix docs
@s2x s2x merged commit 3f54fb0 into main May 18, 2026
4 checks passed
@s2x s2x deleted the feat/esi-inline-161 branch May 18, 2026 18:49
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.

[core] Implement <esi:inline> element

1 participant