Skip to content

glm#6

Open
maooc wants to merge 1 commit intomainfrom
feature/glm-tabs-tip-container
Open

glm#6
maooc wants to merge 1 commit intomainfrom
feature/glm-tabs-tip-container

Conversation

@maooc
Copy link
Copy Markdown
Owner

@maooc maooc commented Mar 13, 2026

This PR adds interactive container support to Mistune:

  1. New directive plugins:

    • tabs.py: Support for ::: tabs and ::: tab syntax
    • tip.py: Support for ::: tip, ::: warning, ::: danger, etc.
  2. New plugin:

    • container.py: Generic container parser
  3. Core enhancements:

    • BlockParser: Added lifecycle hooks (before/after parse, container enter/exit)
    • BlockState: Added container_stack and container_depth tracking
  4. Renderer enhancements:

    • HTMLRenderer: Added interactive CSS/JS injection support
    • Added data-tab-name and data-container-type attributes
  5. CLI enhancements:

    • Added --tabs, --tip, --inject-assets flags

All features are opt-in to maintain backward compatibility.

This PR adds interactive container support to Mistune:

1. New directive plugins:
   - tabs.py: Support for ::: tabs and ::: tab syntax
   - tip.py: Support for ::: tip, ::: warning, ::: danger, etc.

2. New plugin:
   - container.py: Generic container parser

3. Core enhancements:
   - BlockParser: Added lifecycle hooks (before/after parse, container enter/exit)
   - BlockState: Added container_stack and container_depth tracking

4. Renderer enhancements:
   - HTMLRenderer: Added interactive CSS/JS injection support
   - Added data-tab-name and data-container-type attributes

5. CLI enhancements:
   - Added --tabs, --tip, --inject-assets flags

All features are opt-in to maintain backward compatibility.
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