Skip to content

seed#435

Open
maooc wants to merge 1 commit intolepture:mainfrom
maooc:feature/seed-enhanced-directives
Open

seed#435
maooc wants to merge 1 commit intolepture:mainfrom
maooc:feature/seed-enhanced-directives

Conversation

@maooc
Copy link
Copy Markdown

@maooc maooc commented Mar 13, 2026

This PR adds enhanced directive support to Mistune:

  1. New enhanced directive module:

    • enhanced.py: Enhanced directive parser for block-level containers
    • TabsDirective: Support for ::: tabs syntax
    • TipDirective: Support for ::: tip syntax
    • EnhancedParser: Flexible parser with options support
  2. Core enhancements:

    • BlockParser: Added lifecycle hooks for directive parsing
    • BlockState: Added container_type tracking in child_state
  3. Renderer enhancements:

    • HTMLRenderer: Added renderers for tabs and tip containers
    • Added data-tab-name and data-container-type attributes
  4. CLI enhancements:

    • Added support for enhanced directive flags
  5. API changes:

    • Added enable_enhanced_directives parameter to create_markdown()

All features are opt-in to maintain backward compatibility.

This PR adds enhanced directive support to Mistune:

1. New enhanced directive module:
   - enhanced.py: Enhanced directive parser for block-level containers
   - TabsDirective: Support for ::: tabs syntax
   - TipDirective: Support for ::: tip syntax
   - EnhancedParser: Flexible parser with options support

2. Core enhancements:
   - BlockParser: Added lifecycle hooks for directive parsing
   - BlockState: Added container_type tracking in child_state

3. Renderer enhancements:
   - HTMLRenderer: Added renderers for tabs and tip containers
   - Added data-tab-name and data-container-type attributes

4. CLI enhancements:
   - Added support for enhanced directive flags

5. API changes:
   - Added enable_enhanced_directives parameter to create_markdown()

All features are opt-in to maintain backward compatibility.
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

2 participants