astro-accelerator-utils 0.3.15 → 0.3.17

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.
@@ -17,6 +17,7 @@ export class Markdown {
17
17
  * @returns {Promise<string>}
18
18
  */
19
19
  getTextFrom(markdown: string): Promise<string>;
20
+ isLetter(char: any): any;
20
21
  hasUpperCase(input: any): boolean;
21
22
  titleCase(input: any): string;
22
23
  }
@@ -44,9 +44,13 @@ export class Markdown {
44
44
  return markdown.replace(/[\\*>~]/g, '').trim();
45
45
  }
46
46
 
47
+ isLetter(char) {
48
+ return char.match(/[a-zA-Z]/)
49
+ }
50
+
47
51
  hasUpperCase(input) {
48
52
  for (var c of input) {
49
- if (c.toUpperCase() === c) {
53
+ if (this.isLetter(c) && c.toUpperCase() === c) {
50
54
  return true;
51
55
  }
52
56
  }
package/lib/v1/posts.mjs CHANGED
@@ -13,8 +13,8 @@ export class Posts {
13
13
  this.cache = cache;
14
14
  /* istanbul ignore next */
15
15
  this.fetchAll = fetchAll ?? function() {
16
- return import.meta.glob(['/src/pages/**/*.md', '/src/pages/**/*.mdx'], { eager: true });
17
- }
16
+ return import.meta.glob(['/src/pages/**/*.md*'], { eager: true });
17
+ };
18
18
  }
19
19
 
20
20
  /**
@@ -45,4 +45,4 @@ export class Posts {
45
45
  || (depth == (expectedDepth - 1) && p.file.includes(subfolder.toLowerCase() + '.md'));
46
46
  })
47
47
  }
48
- }
48
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-accelerator-utils",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
4
4
  "description": "Astro utilities for Astro Accelerator.",
5
5
  "main": "index.mjs",
6
6
  "type": "module",