@sie-js/vkp 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sie-js/vkp",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Parser and utils for the .VKP files format which is used in the V-Klay.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -104,6 +104,8 @@ function vkpParse(text, options) {
104
104
  }
105
105
 
106
106
  function vkpDetectContent(text) {
107
+ if (text.indexOf('{\\rtf1') >= 0)
108
+ return "RTF";
107
109
  let trimmedText = text.replace(/\/\*.*?\*\//gs, '').replace(/(\/\/|;|#).*?$/mg, '');
108
110
  if (trimmedText.match(/^\s*(0x[a-f0-9]+|[a-f0-9]+)\s*:[^\\/]/mi))
109
111
  return "PATCH";