openchemlib 9.12.0 → 9.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1369,7 +1369,8 @@ function extendFromMolfile(Molecule2) {
1369
1369
  Molecule2.fromMolfile = function fromMolfile(molfile, options = {}) {
1370
1370
  const { customLabelPosition } = options;
1371
1371
  const molecule = _fromMolfile.call(this, molfile);
1372
- const lines = molfile.split("\n");
1372
+ const eol = molfile.includes("\r\n") ? "\r\n" : "\n";
1373
+ const lines = molfile.split(eol);
1373
1374
  if (lines.length < 4 || !lines[3].includes("V2000")) {
1374
1375
  return molecule;
1375
1376
  }
@@ -1426,7 +1427,8 @@ function extendToMolfile(Molecule2) {
1426
1427
  if (!includeCustomAtomLabelsAsALines && !includeCustomAtomLabelsAsVLines && !removeCustomAtomLabels) {
1427
1428
  return molfile;
1428
1429
  }
1429
- let lines = molfile.split("\n");
1430
+ const eol = molfile.includes("\r\n") ? "\r\n" : "\n";
1431
+ let lines = molfile.split(eol);
1430
1432
  if (removeCustomAtomLabels) {
1431
1433
  lines = lines.filter(
1432
1434
  (line) => !CUSTOM_ATOMS_LABELS_TAGS.some((tag) => line.startsWith(tag))
@@ -1453,7 +1455,7 @@ function extendToMolfile(Molecule2) {
1453
1455
  return molfile;
1454
1456
  }
1455
1457
  lines.splice(mEndIndex, 0, ...newLines);
1456
- return lines.join("\n");
1458
+ return lines.join(eol);
1457
1459
  };
1458
1460
  }
1459
1461
 
@@ -71250,7 +71252,7 @@ function getExports($wnd) {
71250
71252
  $sendStats("moduleStartup", "end");
71251
71253
  $gwt && $gwt.permProps && __gwtModuleFunction.__moduleStartupDone($gwt.permProps);
71252
71254
  const toReturn = $wnd["OCL"];
71253
- toReturn.version = "9.12.0";
71255
+ toReturn.version = "9.12.1";
71254
71256
  return toReturn;
71255
71257
  }
71256
71258
  var isBrowserWindow = typeof window !== "undefined" && typeof window.document !== "undefined";
@@ -71394,8 +71396,8 @@ export {
71394
71396
  };
71395
71397
  /**
71396
71398
  * openchemlib - Manipulate molecules
71397
- * @version v9.12.0
71398
- * @date 2025-10-15T07:37:41.764Z
71399
+ * @version v9.12.1
71400
+ * @date 2025-10-22T07:23:31.337Z
71399
71401
  * @link https://github.com/cheminfo/openchemlib-js
71400
71402
  * @license BSD-3-Clause
71401
71403
  */