diff --git a/pym/cl_template.py b/pym/cl_template.py index 2a348c4..757c493 100644 --- a/pym/cl_template.py +++ b/pym/cl_template.py @@ -2006,9 +2006,9 @@ class blocText: r = captionTxtBloc.search(text) if r: headersTxt.append(r.group(0)) - txtSpl = text.split(r.group(0)) + txtSpl = text.partition(r.group(0)) blocTxt = txtSpl[0] - txtWr = txtSpl[1] + txtWr = txtSpl[2] rb = bodyTxtBloc.search(blocTxt) if not blocTxt: blocsTxt.append(blocTxt) @@ -2018,9 +2018,9 @@ class blocText: r = captionTxtBloc.search(txtWr) if r: headersTxt.append(r.group(0)) - txtSpl = txtWr.split(r.group(0)) + txtSpl = txtWr.partition(r.group(0)) blocTxt = txtSpl[0] - txtWr = txtSpl[1] + txtWr = txtSpl[2] rb = bodyTxtBloc.search(blocTxt) if rb: blocsTxt.append(rb.group(0)) diff --git a/pym/format/samba.py b/pym/format/samba.py index 47a0d94..6776289 100644 --- a/pym/format/samba.py +++ b/pym/format/samba.py @@ -46,9 +46,6 @@ class samba(objShare): # Для добавления перевода строки между областями если его нет xmlAreas = xpath.Evaluate("child::area", self.docObj.body) for xmlArea in xmlAreas: - if xmlArea.previousSibling and\ - self.docObj.getTypeField(xmlArea.previousSibling) == "br": - continue firstArea = False xmlFields = xpath.Evaluate("child::field", xmlArea) if not (xmlFields and\