Skip to content

docs: clarify extension terminology ambiguity#3881

Open
njg7194 wants to merge 1 commit intomarkedjs:masterfrom
njg7194:docs/clarify-extensions-terminology
Open

docs: clarify extension terminology ambiguity#3881
njg7194 wants to merge 1 commit intomarkedjs:masterfrom
njg7194:docs/clarify-extensions-terminology

Conversation

@njg7194
Copy link

@njg7194 njg7194 commented Feb 1, 2026

Summary

This PR addresses the confusion around the "extensions" terminology as described in #3182.

Changes

Added a Terminology Note section at the beginning of the USING_PRO.md documentation that clearly distinguishes between:

Term TypeScript Type Description
Marked Extension MarkedExtension The configuration object passed to marked.use()
Custom Extension TokenizerAndRendererExtension Objects within the extensions array for custom syntax

Also included a code example showing the relationship between these two concepts.

Related Issue

Fixes #3182

Checklist

  • Documentation change only
  • No breaking changes

Add a terminology note section to explain the difference between:
- MarkedExtension: the configuration object passed to marked.use()
- TokenizerAndRendererExtension: custom syntax definitions in the extensions array

This addresses the confusion described in markedjs#3182 where 'extensions' is used
with two different meanings throughout the documentation.

Fixes markedjs#3182
@vercel
Copy link

vercel bot commented Feb 1, 2026

Someone is attempting to deploy a commit to the MarkedJS Team on Vercel.

A member of the Team first needs to authorize it.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @njg7194, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the clarity of the marked library's documentation by resolving a long-standing ambiguity regarding the term 'extensions'. By introducing a dedicated terminology section with precise definitions and a practical code example, it aims to enhance user understanding and streamline the process of extending the library's functionality, ultimately making the documentation more accessible and less confusing for developers.

Highlights

  • Terminology Clarification: Introduced a new 'Terminology Note' section in the USING_PRO.md documentation to address ambiguity around the term 'extensions'.
  • Defined Key Terms: Clearly distinguished between 'Marked Extension' (the top-level configuration object for marked.use()) and 'Custom Extension' (objects within the extensions array for custom syntax) with their respective TypeScript types and descriptions.
  • Code Example Provided: Included a practical JavaScript code example to illustrate the relationship and usage of both 'Marked Extension' and 'Custom Extension' concepts.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a helpful 'Terminology Note' to the documentation to clarify the difference between 'Marked Extension' and 'Custom Extension'. The explanation is clear and the code example is illustrative. I've added a couple of minor suggestions to include the walkTokens extension point for even greater completeness. Overall, this is a valuable improvement to the documentation.

@vercel
Copy link

vercel bot commented Feb 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marked-website Ready Ready Preview, Comment Feb 1, 2026 8:01pm

Request Review

Copy link
Member

@UziTech UziTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 💯

Hopefully that will clear up some of the documentation issues.

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.

Clarify ambiguity around "extensions"

2 participants