mirror of
https://github.com/vxcontrol/langchaingo.git
synced 2026-07-21 00:45:22 -04:00
536f16c12a
The markdown splitter was not correctly handling singular markdown tokens like Hr or Fence. These tokens do not have a corresponding close type, which was causing issues in the indexOfCloseTag function. To fix this, a check has been added to return the start index if the closeType is nil, indicating a singular token. This prevents the function from incorrectly trying to find a close tag for these tokens and running past the end of the document.