For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /project/contributing.md.
  • English
  • Contributing and Feedback

    Reporting issues

    An issue that includes the following is much faster to triage:

    • The smallest wikitext source and its pageName.
    • The entry and relevant options (parseOptions, prepareOptions, policy, labels).
    • Library version, parserVersion, React, and bundler versions.
    • The error code, stage, and cause, plus document.diagnostics.
    • Expected versus actual output; for styling, a screenshot or DOM fragment.

    First confirm the behavior is not already covered by known limitations or syntax support.

    Running the docs site

    The documentation uses Rspress and lives in website/:

    pnpm install
    pnpm docs:dev     # local preview
    pnpm docs:build   # build into website/doc_build/
    pnpm docs:preview # preview the build
    • Chinese content is in website/docs/zh/, English in website/docs/en/; add both when creating a page.
    • Navigation comes from each directory's _meta.json and the top-level _nav.json.
    • Runnable guide examples use ```tsx preview blocks; they import through public package entries and are rendered by @rspress/plugin-preview.
    • The home page example is loaded on the client by website/theme/HomeExample.tsx.

    Editing docs

    • Behavior, defaults, and exports follow src/ and tests/; do not copy full test inventories or fixed performance numbers into the docs.
    • Guides answer "how", reference answers "what"; state a fact once and link to it elsewhere.
    • Snippets should stand alone; call out trusted code and untrusted input around security boundaries.
    • Keep Chinese and English sections in one-to-one correspondence, and keep terminology stable: parse snapshot, render snapshot, resolver, policy, labels.

    Pre-submit checks

    pnpm format:check
    pnpm lint
    pnpm typecheck
    pnpm test
    pnpm docs:build

    For build, export, or dependency changes, also run:

    pnpm test:consumer
    pnpm build

    The full contributor flow, environment, and CI details are in CONTRIBUTING.md.

    License

    Contributions are distributed under the repository's GPL-3.0-or-later license. New third-party code or assets must update NOTICE and THIRD_PARTY_LICENSES.