coffeehaml 0.10.0 → 0.10.1
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/dist/cli.js +0 -0
- package/dist/parser.js +4 -4
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/parser.js
CHANGED
|
@@ -242,9 +242,9 @@ parseElement = function(state) {
|
|
|
242
242
|
isSelfClosing = true;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
// Parse inline text or output
|
|
245
|
+
// Parse inline text or output (only if on the same line as the tag)
|
|
246
246
|
children = [];
|
|
247
|
-
if (state.current() && !isSelfClosing) {
|
|
247
|
+
if (state.current() && !isSelfClosing && state.current().location.start.line === tagToken.location.end.line) {
|
|
248
248
|
switch (state.current().type) {
|
|
249
249
|
case TokenType.OUTPUT:
|
|
250
250
|
tok = state.advance();
|
|
@@ -312,9 +312,9 @@ parseImplicitDiv = function(state) {
|
|
|
312
312
|
attrStyle = 'bare';
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
// Parse inline text
|
|
315
|
+
// Parse inline text (only if on the same line as the div)
|
|
316
316
|
children = [];
|
|
317
|
-
if (((ref1 = state.current()) != null ? ref1.type : void 0) === TokenType.TEXT) {
|
|
317
|
+
if (((ref1 = state.current()) != null ? ref1.type : void 0) === TokenType.TEXT && state.current().location.start.line === firstToken.location.end.line) {
|
|
318
318
|
textToken = state.advance();
|
|
319
319
|
children.push(new Text(textToken.value, textToken.location));
|
|
320
320
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coffeehaml",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Haml structure. CoffeeScript semantics. React runtime. Zero runtime. Vite-native.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"homepage": "https://github.com/dantiel/CoffeeHaml#readme",
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"bin": {
|
|
18
|
-
"coffeehaml": "
|
|
18
|
+
"coffeehaml": "dist/cli.js"
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|