sveltedoc-parser
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -6,3 +6,3 @@ # Change Log | ||
## Unreleased | ||
## [1.1.5] 07.12.2018 | ||
@@ -9,0 +9,0 @@ - [Fixed] Fix and refactor param keyword parsing to handle some wrong cases (fix and close issue #7) |
@@ -0,10 +1,11 @@ | ||
const PARAM_NAME = '[a-z0-9$\\.\\[\\]_]+'; | ||
const TYPE = '\\s*\\(?\\s*(?:(?:\\*|[a-z_]+[a-z0-9_<>\\[\\]]*|\\\'[^\\\']*\\\')\\s*\\|?\\s*)+\\s*\\)?\\s*'; | ||
const TYPE_RE = new RegExp(`^\\s*\\{(${TYPE})\\}`, 'i'); | ||
const TYPE = '\\{([^\\}]*)\\}'; | ||
const PARAM_TYPE = '\\{((?:\\.\\.\\.)?[^\\}]*)=?\\}'; | ||
const PARAM_RE = new RegExp(`^\\s*(?:\\{((?:\\.\\.\\.)?${TYPE}=?)\\}\\s+)?(?:\\[\\s*(${PARAM_NAME})\\s*(?:=\s*([^\\]]+))?\\]|(${PARAM_NAME}))(?:\\s+(?:\\-\\s+)?(.*))?`, 'i'); | ||
const TYPE_RE = new RegExp(`^\\s*${TYPE}`, 'i'); | ||
const PARAM_RE = new RegExp(`^\\s*(?:${PARAM_TYPE}\\s+)?(?:\\[\\s*(${PARAM_NAME})\\s*(?:=\s*([^\\]]+))?\\]|(${PARAM_NAME}))(?:\\s+(?:\\-\\s+)?(.*))?`, 'i'); | ||
const RETURN_RE = new RegExp(`^\\s*(${TYPE}\\s+)?-?(.*)`, 'i'); | ||
const RETURN_RE = new RegExp(`^\\s*(\\{\\(?(${TYPE})\\)?\\}\\s+)?-?(.*)`, 'i'); | ||
const DEFAULT_TYPE = 'any'; | ||
@@ -11,0 +12,0 @@ |
{ | ||
"name": "sveltedoc-parser", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Generate a JSON documentation for a Svelte file", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65619
1162