Skip to content

Commit

Permalink
:bugfix: finally fix #2 and go backin time (0.3.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
cfuendev committed Apr 21, 2023
1 parent 3999756 commit b9f6e9b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ document.body.appendChild(div);
- fix issue [#2](https://github.com/cfuendev/twimba/issues/2): Three-letter shorthands like `ead` and `eaf` not being correctly transpiled.
- fix YET ANOTHER PROBLEM from [#2](https://github.com/cfuendev/twimba/issues/2): Two-letter shorthands for easing properties (Such as `ea` and `eb`) not being correctly transpiled.

- Apr 21, 2023: **0.3.3**
- not reported as an issue, but [#2](https://github.com/cfuendev/twimba/issues/2) was still a problem. ease shorthands would fail if used at the end of an Imba CSS string.

- Jan 19, 2023: **Twimba v.0.2.0**, various orders of magnitude faster than v0.1 and supports colors.

- Jan 21, 2023: **0.2.1**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cfuen/twimba",
"version": "0.3.3",
"version": "0.3.2",
"description": "A small macro that converts Imba CSS into Vanilla CSS at runtime!",
"main": "dist/twimba.min.js",
"module": "dist/twimba.min.js",
Expand Down
12 changes: 7 additions & 5 deletions twimba.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ export const twimba = (strings, ...values) => {
j - token list token char(acter) index
c - (current) char(acter)
pl = parsed (tokens) list */
tl = s.split(/\s/);
tl = s.trim().split(/\s/);
// console.log(tl)
let b = [];
let eb = null;
Expand All @@ -472,12 +472,14 @@ export const twimba = (strings, ...values) => {
for (let i = 0; i < tl.length; i++) {
for (let j = 0; j < tl[i].length; j++) {
let c = tl[i][j];
if (eb && i === tl.length-2) {
console.log(c)
if (eb && i === tl.length-1) {
//console.log(`pillese la i: ${i}\ny la j: ${j}`)
//console.log(`pillese la tl.length: ${tl.length}\ny la tl[i].length: ${tl[i].length}`)
//console.log(`sera? ${i === tl.length-2}`)
//console.log("DIOS")
//console.log(eb+' '+tl[i])
console.log("DIOS")
console.log(tl)
console.log(eb+' '+tl[i])
pl.push(eb+' '+tl[i]);
eb = null;
break;
Expand Down Expand Up @@ -602,7 +604,7 @@ export const twimba = (strings, ...values) => {
}

if (eb) {
//console.log(`al final: ${eb}`)
console.log(`al final: ${eb}`)
eb += " " + b;
b = "";
continue;
Expand Down

0 comments on commit b9f6e9b

Please sign in to comment.