feat: Add element content capture (Issue #159)#191
Merged
rdmueller merged 3 commits intodocToolchain:mainfrom Jan 26, 2026
Merged
feat: Add element content capture (Issue #159)#191rdmueller merged 3 commits intodocToolchain:mainfrom
rdmueller merged 3 commits intodocToolchain:mainfrom
Conversation
Changes: - Parser: Capture content for code, tables, lists, diagrams - API: Add attributes field to ElementItem model - CLI: Add --include-content and --content-limit flags - MCP: Add include_content and content_limit parameters - Tests: Add comprehensive content capture tests (471 passing) - Docs: Update API and CLI specifications Details: - AsciiDoc parser captures content for all block elements - Markdown parser captures content for code, tables, lists - Content is opt-in via --include-content flag - Content can be truncated with --content-limit N - API always returns attributes when present - CLI filters attributes based on flags Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove accidentally committed test artifacts.
- Fix line too long (E501) - Fix unsorted imports (I001)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Issue #159: Add content capture to elements API/CLI.
Elements now capture their actual content (code, tables, lists, diagrams) and expose it via:
get_elements(include_content=True, content_limit=N)dacli elements --include-content [--content-limit N]ElementItem.attributesdict containing element-specific dataChanges
attributesfield toElementItemmodel (Issue elements command only returns metadata, not the actual content of elements #159)--include-contentand--content-limit Nflagsinclude_contentandcontent_limitparameters toget_elementstoolContent Capture Strategy
Element.attributes["content"]dict during parsing--include-contentflag (default: metadata only)--content-limit Nlanguage,contentcolumns,rows,content(raw table text)list_type,content(all items)alt,src/target,titleformat,name,content(diagram source)admonition_type,contentTest Results
✅ All tests passing (471 total, including 10 new tests for Issue #159)
✅ Coverage: 90.5%
✅ All linting checks passed
This PR contains only the changes for Issue #159, with a clean linear history.
Fixes #159
🤖 Generated with Claude Code