llms.txt exports drop `import` lines and JSX-like code from code examples
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, typescript
- Domain
- documentation
Research direction
Start with stripMdxSyntax() in src/utils/llms.ts and reproduce the issue using /llms/api-5x.txt and the linked performance best practices example. Check how the import and JSX-like text in fenced code blocks are handled. Done means code examples retain that content in the plain-text exports.
Written by the indexing model from the issue text.
Description
The plain-text exports under /llms/ remove content from fenced code blocks. stripMdxSyntax() in src/utils/llms.ts strips every line that starts with import and every <Capitalized ...> tag in the file, including lines inside code examples.
Steps to reproduce
- Open https://expressjs.com/llms/api-5x.txt.
- Find the first
```mjs title="index.mjs"block.
Expected behavior
The example starts with import express from 'express';, as on the HTML page.
Actual behavior
The import line is replaced by an empty line, so the ESM examples reference express without importing it. The same applies to every ESM example in the API and guide exports. Code that looks like a JSX tag is also removed, for example Description=<Awesome Express App> in the systemd unit on the performance best practices page becomes Description=.
- Dominant language
- MDX
- Stars
- 5.4k
- Forks
- 2.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 28
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from expressjs/expressjs.com
-
RSS feeds use Atom-style <author> elements, which are invalid in RSS 2.0Possibly taken @NopeCharon claimed this 8 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
expressjs/expressjs.com#2577 ·
Maintainers usually reply within 1 day
-
Sitemap lists hundreds of URLs that declare a different canonicalPossibly taken @NopeCharon claimed this 13 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
expressjs/expressjs.com#2568 ·
Maintainers usually reply within 1 day
-
Remove problematic examples from error handling guidePossibly taken @Skytuhua claimed this 24 days ago. Openbug require-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
expressjs/expressjs.com#2549 · 1 reaction ·
Maintainers usually reply within 1 day
-
Suggestion: mention lint-time security checks on the security best practices pagePossibly taken @methila-2056 claimed this 85 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
expressjs/expressjs.com#2471 ·
Maintainers usually reply within 1 day
-
Document customizing `express.json()` size limit for specific routesPossibly taken @vibhor-aggr claimed this 132 days ago. Open4.x 5.x docs
Difficulty 1/5 Under an hour Newbie friendliness 62/100
expressjs/expressjs.com#1421 · 3 comments · 2 reactions ·
Maintainers usually reply within 1 day
All issues in expressjs/expressjs.com
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 89/100
Maintainers usually reply within 1 day
-
sync-en
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Team:Admin triaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
elastic/docs-content#9532 · 1 comment · 1 reaction ·
Maintainers usually reply within 2 days
-
Area/Connector module/solace Priority/Low Type/Docs
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ballerina-platform/ballerina-library#9850 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
gke-labs/kube-agents#6620 ·
Maintainers usually reply within 1 day