@hortonstudio/main 1.1.11 → 1.1.12

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.
@@ -244,7 +244,7 @@ export async function init() {
244
244
  // Animation timeline
245
245
  document.fonts.ready.then(() => {
246
246
 
247
- // Helper function to extract span mappings
247
+ // Helper function to extract span mappings and flatten HTML
248
248
  function extractSpanMappings(element) {
249
249
  const spanMappings = new Map();
250
250
  const spans = element.querySelectorAll('span');
@@ -255,6 +255,9 @@ export async function init() {
255
255
  if (text && classes.length > 0) {
256
256
  spanMappings.set(text, classes);
257
257
  }
258
+
259
+ // Replace span with its text content to flatten HTML
260
+ span.replaceWith(document.createTextNode(span.textContent));
258
261
  });
259
262
 
260
263
  return spanMappings;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hortonstudio/main",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {