auto-component 0.0.22 → 0.0.24

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.jsx +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auto-component",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "main": "src/index.jsx",
5
5
  "peerDependencies": {
6
6
  "react": "^18.2.0",
package/src/index.jsx CHANGED
@@ -1,5 +1,6 @@
1
1
  import { useState, useEffect } from 'react'
2
- import beautify from 'js-beautify';
2
+ // import beautify from 'js-beautify';
3
+ import beautify from './node_modules/js-beautify/js/lib/beautify.js';
3
4
  import './auto-component.css'
4
5
 
5
6
  const AutoComponent = ({ exclusions }) => {
@@ -53,7 +54,8 @@ const AutoComponent = ({ exclusions }) => {
53
54
  const cleanedHtml = html.replace(regexExcludeClass, '$1$3');
54
55
  const scriptIndex = cleanedHtml.lastIndexOf('<script');
55
56
 
56
- return formatHtml(cleanedHtml.substring(0, scriptIndex));
57
+ // return formatHtml(cleanedHtml.substring(0, scriptIndex));
58
+ return cleanedHtml.substring(0, scriptIndex);
57
59
  };
58
60
 
59
61
  // full exclusion