define(["exports", "core/utils"], function (exports, _utils) {
  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.name = undefined;
  exports.run = run;
  var name = exports.name = "core/data-transform"; // Module core/data-transform
  // Support for the data-transform attribute
  // Any element in the tree that has a data-transform attribute is processed here.
  // The data-transform attribute can contain a white space separated list of functions
  // to call (these must have been defined globally). Each is called with a reference to
  // the core/utils plugin and the innerHTML of the element. The output of each is fed
  // as the input to the next, and the output of the last one replaces the HTML content
  // of the element.
  // IMPORTANT:
  //  It is unlikely that you should use this module. The odds are that unless you really
  //  know what you are doing, you should be using a dedicated module instead. This feature
  //  is not actively supported and support for it may be dropped. It is not accounted for
  //  in the test suite, and therefore could easily break.
  function run(conf, doc, cb) {
    Array.from(doc.querySelectorAll("[data-transform]")).forEach(function (el) {
      el.innerHTML = (0, _utils.runTransforms)(el.innerHTML, el.dataset.transform);
      el.removeAttribute("data-transform");
    });
    cb();
  }
});
//# sourceMappingURL=data-transform.js.map