vue-inbrowser-compiler
Advanced tools
Comparing version 4.69.0 to 4.69.2
# Change Log | ||
## 4.69.2 | ||
### Patch Changes | ||
- [`70317379`](https://github.com/vue-styleguidist/vue-styleguidist/commit/703173794ee8c2edc701bb678b9c9e7b34a3e1c1) Thanks [@elevatebart](https://github.com/elevatebart)! - make sure we don't count the \n at the begining of templates | ||
## 4.69.0 | ||
@@ -4,0 +10,0 @@ |
@@ -260,5 +260,5 @@ 'use strict'; | ||
} | ||
const findStartTemplateMatch = /^\W*</.test(code) ? { index: 0 } : code.match(/\n[\t ]*</); | ||
const findStartTemplateMatch = /^[\t ]*</.test(code) ? { index: -1 } : code.match(/\n[\t ]*</); | ||
const limitScript = findStartTemplateMatch && findStartTemplateMatch.index !== undefined | ||
? findStartTemplateMatch.index | ||
? findStartTemplateMatch.index + 1 // we don't want to count the \n in there | ||
: -1; | ||
@@ -265,0 +265,0 @@ template = limitScript > -1 ? code.slice(limitScript) : undefined; |
@@ -252,5 +252,5 @@ import { isVue3, parseComponent, transformOneImport, compileTemplateForEval, compileTemplateForEvalSetup, isCodeVueSfc } from 'vue-inbrowser-compiler-utils'; | ||
} | ||
const findStartTemplateMatch = /^\W*</.test(code) ? { index: 0 } : code.match(/\n[\t ]*</); | ||
const findStartTemplateMatch = /^[\t ]*</.test(code) ? { index: -1 } : code.match(/\n[\t ]*</); | ||
const limitScript = findStartTemplateMatch && findStartTemplateMatch.index !== undefined | ||
? findStartTemplateMatch.index | ||
? findStartTemplateMatch.index + 1 // we don't want to count the \n in there | ||
: -1; | ||
@@ -257,0 +257,0 @@ template = limitScript > -1 ? code.slice(limitScript) : undefined; |
{ | ||
"name": "vue-inbrowser-compiler", | ||
"version": "4.69.0", | ||
"version": "4.69.2", | ||
"description": "compile vue single file components right in your browser", | ||
@@ -5,0 +5,0 @@ "module": "lib/vue-inbrowser-compiler.esm.js", |
@@ -88,6 +88,6 @@ import { transform, TransformOptions } from 'buble' | ||
const findStartTemplateMatch = /^\W*</.test(code) ? { index: 0 } : code.match(/\n[\t ]*</) | ||
const findStartTemplateMatch = /^[\t ]*</.test(code) ? { index: -1 } : code.match(/\n[\t ]*</) | ||
const limitScript = | ||
findStartTemplateMatch && findStartTemplateMatch.index !== undefined | ||
? findStartTemplateMatch.index | ||
? findStartTemplateMatch.index + 1 // we don't want to count the \n in there | ||
: -1 | ||
@@ -98,2 +98,3 @@ template = limitScript > -1 ? code.slice(limitScript) : undefined | ||
} | ||
const ast = getAst(code) | ||
@@ -100,0 +101,0 @@ let offset = 0 |
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
85982