[PR #2524] [MERGED] docs: fix markdown text splitter example usage #2514

Closed
opened 2026-02-17 17:23:29 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/2524
Author: @aditya-gg04
Created: 2/6/2026
Status: Merged
Merged: 2/6/2026
Merged by: @lnhsingh

Base: mainHead: fix-markdown-splitter-docs


📝 Commits (1)

  • 39e1e69 docs: fix markdown text splitter example usage

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/oss/integrations/splitters/code_splitter.mdx (+1 -1)

📄 Description

Overview

This PR fixes an incorrect JavaScript example in the Markdown text splitter documentation.
The existing example passed { pageContent } objects to createDocuments, but the method expects an array of strings (string[]). This mismatch caused a runtime error when users followed the docs.

Type of change

Type: Fix typo/bug/link/formatting

Related issues/PRs

  • Linear issue: N/A
  • Slack thread: N/A

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed (not required for this change)

Additional notes

This is a documentation-only fix and does not change any runtime behavior.
The updated example now aligns with the createDocuments(texts: string[]) method signature used throughout the codebase and tests.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/2524 **Author:** [@aditya-gg04](https://github.com/aditya-gg04) **Created:** 2/6/2026 **Status:** ✅ Merged **Merged:** 2/6/2026 **Merged by:** [@lnhsingh](https://github.com/lnhsingh) **Base:** `main` ← **Head:** `fix-markdown-splitter-docs` --- ### 📝 Commits (1) - [`39e1e69`](https://github.com/langchain-ai/docs/commit/39e1e6941ce5439a5fb328faa7547d7c41f6afff) docs: fix markdown text splitter example usage ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/integrations/splitters/code_splitter.mdx` (+1 -1) </details> ### 📄 Description ## Overview This PR fixes an incorrect JavaScript example in the Markdown text splitter documentation. The existing example passed `{ pageContent }` objects to `createDocuments`, but the method expects an array of strings (`string[]`). This mismatch caused a runtime error when users followed the docs. ## Type of change **Type:** Fix typo/bug/link/formatting ## Related issues/PRs - GitHub issue: fixes langchain-ai/langchainjs#9840 - Feature PR: N/A <!-- For LangChain employees, if applicable: --> - Linear issue: N/A - Slack thread: N/A ## Checklist - [x] I have read the [contributing guidelines](README.md) - [x] I have tested my changes locally using `docs dev` - [x] All code examples have been tested and work correctly - [x] I have used **root relative** paths for internal links - [ ] I have updated navigation in `src/docs.json` if needed (not required for this change) ## Additional notes This is a documentation-only fix and does not change any runtime behavior. The updated example now aligns with the `createDocuments(texts: string[])` method signature used throughout the codebase and tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-17 17:23:29 -05:00
yindo closed this issue 2026-02-17 17:23:29 -05:00
yindo changed title from [PR #2524] docs: fix markdown text splitter example usage to [PR #2524] [MERGED] docs: fix markdown text splitter example usage 2026-06-05 18:19:00 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2514