src/language-markdown/preprocess.js/splitTextIntoSentences
function splitTextIntoSentences(ast, options) {
  return mapAst(ast, (node, index, [parentNode]) => {
    if (node.type !== "text") {
      return node;
    }

    let { value } = node;

    if (parentNode.type === "paragraph") {
      if (index === 0) {
        value = value.trimStart();
      }
      if (index === parentNode.children.length - 1) {
        value = value.trimEnd();
      }
    }

    return {
      type: "sentence",
      position: node.position,
      children: splitText(value, options),
    };
  });
}