Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix markdown text splitter horizontal lines #5625

Merged
merged 8 commits into from
Jun 5, 2023
Merged
4 changes: 2 additions & 2 deletions langchain/text_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def get_separators_for_language(language: Language) -> List[str]:
# Split along section titles
"\n===\n",
"\n---\n",
"\n***\n",
"\n\*\*\*\n",
# Split along directive markers
"\n.. ",
# Split by the normal type of lines
Expand Down Expand Up @@ -617,7 +617,7 @@ def get_separators_for_language(language: Language) -> List[str]:
# End of code block
"```\n\n",
# Horizontal lines
"\n\n***\n\n",
"\n\n\*\*\*\n\n",
"\n\n---\n\n",
"\n\n___\n\n",
# Note that this splitter doesn't handle horizontal lines defined
Expand Down