chess-moments 0.11.2 → 0.11.4

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.
package/README.md CHANGED
@@ -72,3 +72,10 @@ The basic PGN file `1. e4 e5 *` will generated the following chess moments in JS
72
72
  }
73
73
  ]
74
74
  ```
75
+
76
+ ## Limitations
77
+
78
+ This package does not support the following features:
79
+
80
+ - [chess symbol annotations](https://en.wikipedia.org/wiki/Chess_annotation_symbols)
81
+ - chess clock comments are removed
@@ -1,7 +1,8 @@
1
1
  module.exports = (comment) => {
2
2
  try {
3
- // Remove any shape comments like [%cal Ya7,Ya6] or [%csl Ya7,Ya6]
4
- return comment.replace(/\s*\[%c(?:al|sl) [^\]]+\]/g, '').trim();
3
+ // Remove shape, clock, and eval comments
4
+ const commentRegex = /\s*\[%(?:cal|csl|clk|eval|evp) [^\]]+\]/g;
5
+ return comment.replace(commentRegex, '').trim();
5
6
  } catch (err) {
6
7
  return undefined;
7
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chess-moments",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "PGN parser that transforms PGN files into chess \"moments\"",
5
5
  "main": "dist/index.js",
6
6
  "files": [