---
layout: default
---

# Splitters por tipo de contenido

<v-clicks>

`RecursiveCharacterTextSplitter.fromLanguage()` usa separadores adaptados a cada formato

### Markdown — respeta encabezados y listas
```typescript
import { RecursiveCharacterTextSplitter } from "@langchain/textsplitters";

const mdSplitter = RecursiveCharacterTextSplitter.fromLanguage("markdown", {
  chunkSize: 1000, chunkOverlap: 200,
});
```

### HTML — respeta estructura de etiquetas
```typescript
const htmlSplitter = RecursiveCharacterTextSplitter.fromLanguage("html", {
  chunkSize: 1000, chunkOverlap: 200,
});
```

### Código JS/TS — respeta funciones y clases
```typescript
const codeSplitter = RecursiveCharacterTextSplitter.fromLanguage("js", {
  chunkSize: 1500, chunkOverlap: 200,
});
```

Otros lenguajes soportados: `python`, `java`, `go`, `rust`, `ruby`, `php`...

</v-clicks>
