feat(editorial): add :Leet editorial command - #230
Open
thecuriousone25 wants to merge 1 commit into
Open
Conversation
Open a problem's official solution article in a floating popup. - api: `question.editorial` (ugcArticleOfficialSolutionArticle) and `question.playground` (allPlaygroundCodes); both tolerate null/missing GraphQL data. - ui: `Editorial` popup renders the article's markdown and inlines each playground `<iframe>` as a fenced code block. Inline/display LaTeX (`$...$`, `$$...$$`) is normalized to plain text/Unicode. - premium: skip the fetch only when a paid-only problem meets a non-premium user; otherwise fetch and fall back to "No editorial available".
thecuriousone25
force-pushed
the
feat-editorial
branch
from
August 4, 2026 19:37
43dd294 to
08077be
Compare
Author
|
@kawre Can you please take a look at this? |
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.
Open a problem's official solution article (editorial) in a floating popup, styled like
:Leet info/:Leet hints.What it does
question.editorial(slug)viaugcArticleOfficialSolutionArticleandquestion.playground(uuid)viaallPlaygroundCodes. Both tolerate null/missing GraphQLdataand malformed responses.Editorialpopup (leetcode-ui/popup/editorial.lua) with a self-contained markdown renderer (headings, lists, blockquotes, rules, fenced code, inline emphasis). Each editorial<iframe>playground embed is replaced inline with its actual code, fetched from the playground API, as a fenced code block. Content loads lazily on first open.config.auth.is_premium); every other case is fetched and falls back to "No editorial available" if declined, so public editorials on free problems still load.Usage
:Leet editorialwhile a problem is open.