<commit_before>var AnnotationView = require('../annotation').View;
var FormulaView = require('../formula').View;

var InlineFormulaView = function(node, viewFactory) {
  AnnotationView.call(this, node, viewFactory);
};

InlineFormulaView.Prototype = function() {

  this.createElement = function() {
    return document.createElement('span');
  };

  this.render = function() {
    var formula = this.node.document.get(this.node.target);
    var formulaView = new FormulaView(formula, this.viewFactory);
    this.el.innerHTML = formulaView.render().el.innerHTML;
    return this;
  };

};
InlineFormulaView.Prototype.prototype = AnnotationView.prototype;
InlineFormulaView.prototype = new InlineFormulaView.Prototype();

module.exports = InlineFormulaView;<commit_msg>Use view factory to spawn formula view.<commit_after>var AnnotationView = require('../annotation').View;

var InlineFormulaView = function(node, viewFactory) {
  AnnotationView.call(this, node, viewFactory);
};

InlineFormulaView.Prototype = function() {

  this.createElement = function() {
    return document.createElement('span');
  };

  this.render = function() {
    var formula = this.node.document.get(this.node.target);
    var formulaView = this.viewFactory.createView(formula);
    this.el.innerHTML = formulaView.render().el.innerHTML;
    return this;
  };

};
InlineFormulaView.Prototype.prototype = AnnotationView.prototype;
InlineFormulaView.prototype = new InlineFormulaView.Prototype();

module.exports = InlineFormulaView;
{'fraction_non_alphanumeric': 0.1291390728476821, 'fraction_numerical': 0.0, 'mean_word_length': 5.068273092369478, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1550446', 'n_tokens_mistral': 435, 'n_tokens_neox': 436, 'n_words': 80}