fscss 1.1.9 → 1.1.11

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.
@@ -3,7 +3,7 @@ function procCntInit(ntc,stc){
3
3
  return `${nu}`;
4
4
  }
5
5
  function procCnt(text){
6
- const reg=/count\((\d+)(?:,(\d+)?)?\)/g;
6
+ const reg=/count\(\s*([\d\.]+)\s*(?:\s*,\s*([\d\.]+)?)?\s*\)/g;
7
7
  text = text.replace(reg, (March, num, step)=>{
8
8
  if(step===null)step=1;
9
9
  return procCntInit(parseInt(num), parseInt(step?step:1));
@@ -11,7 +11,7 @@ function procCntInit(ntc,stc){
11
11
  return text;
12
12
  }
13
13
  function procChe(text) {
14
- const reg = /length\((?:([^\)]+)|"([^"]*)"|'([^']*)')\)/g;
14
+ const reg = /length\((?:([^\)]+)|\s*"([^"]*)"\s*|\s*'([^']*)'\s*)\)/g;
15
15
  text = text.replace(reg, (match, txt, txt2, txt3) => {
16
16
  const resTxt = txt || txt2 || txt3;
17
17
  return resTxt.length;
package/lib/processor.js CHANGED
@@ -18,12 +18,12 @@ import {
18
18
  } from "./functions/all.js";
19
19
  import { procImp } from "./functions/procImp.js";
20
20
  import { impSel } from "./functions/impSel.js";
21
- export async function processFscss(css, options = {}) {
21
+ export async function processFscss(css, options = {}){
22
22
  const { inputDir = process.cwd() } = options;
23
23
 
24
24
  if (!css.includes("exec.obj.block(all)")) {
25
25
  if(!css.includes("exec.obj.block(init lab)"))css = initlibraries(css);
26
- if(!css.includes("exec.obj.block(f import)")||!css.includes("exec.obj.block(f import pick)")){css = await impSel(css, {inputDir});
26
+ if(!css.includes("exec.obj.block(f import)")||!css.includes("exec.obj.block(f import pick)")){css = await impSel(css, {inputDir})};
27
27
  if(!css.includes("exec.obj.block(f import)")){css = await procImp(css, {inputDir});}
28
28
 
29
29
  if(!css.includes("exec.obj.block(store:before)")||!css.includes("exec.obj.block(store)"))css = replaceRe(css);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fscss",
3
3
  "description": "Figured Shorthand Cascading Style Sheet",
4
- "version": "1.1.9",
4
+ "version": "1.1.11",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "bin": {