@lancedb/lancedb 0.15.0 → 0.15.1-beta.3

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.
@@ -40,23 +40,28 @@ function processDirectory(directoryPath) {
40
40
  function processContents(contents) {
41
41
  // This changes the parameters section to put the parameter description on
42
42
  // the same line as the bullet with the parameter name and type.
43
- return contents.replace(/(## Parameters[\s\S]*?)(?=##|$)/g, (match) => {
44
- let lines = match
45
- .split("\n")
46
- .map((line) => line.trim())
47
-
48
- .filter((line) => line !== "")
49
- .map((line) => {
50
- if (line.startsWith("##")) {
51
- return line;
52
- } else if (line.startsWith("")) {
53
- return "\n*" + line.substring(1);
54
- } else {
55
- return " " + line;
56
- }
57
- });
58
- return lines.join("\n") + "\n\n";
59
- });
43
+ return (
44
+ contents
45
+ .replace(/(## Parameters[\s\S]*?)(?=##|$)/g, (match) => {
46
+ let lines = match
47
+ .split("\n")
48
+ .map((line) => line.trim())
49
+
50
+ .filter((line) => line !== "")
51
+ .map((line) => {
52
+ if (line.startsWith("##")) {
53
+ return line;
54
+ } else if (line.startsWith("•")) {
55
+ return "\n*" + line.substring(1);
56
+ } else {
57
+ return " " + line;
58
+ }
59
+ });
60
+ return lines.join("\n") + "\n\n";
61
+ })
62
+ // Also trim trailing whitespace
63
+ .replace(/([^ \t])[ \t]+\n/g, "$1\n")
64
+ );
60
65
  }
61
66
 
62
67
  // Start processing from the root directory