import { ATTRIBUTE_INDENT, convertMarginLeftToIndentValue } from './ParagraphNodeSpec.js';
export default function patchParagraphElements(doc) {
  Array.from(doc.querySelectorAll('p')).forEach(patchParagraphElement);
}
function patchParagraphElement(pElement) {
  var marginLeft = pElement.style.marginLeft;
  if (marginLeft) {
    var indent = convertMarginLeftToIndentValue(marginLeft);
    if (indent) {
      pElement.setAttribute(ATTRIBUTE_INDENT, String(indent));
    }
  }
}