<commit_before>---
published: true
layout: post
title: Modifications to slm
---



In `lib/template.js`:

```
p.render = function(src, model, options, vm) {
  vm = vm || new this.VM();

  var js_beautify = require('js-beautify');
  if (undefined !== js_beautify) {
    var html_beautify = require('js-beautify').html;
  }

  var compiled = this.compile(src, options, vm)(model, vm);

  if (html_beautify !== undefined) {<commit_msg>Updated 2016-02-04-slm-mods.md<commit_after>---
published: true
layout: post
title: Modifications to slm
---



### Enable js-beautify. 

In `/usr/local/lib/node_modules/roots/node_modules/accord/node_modules/slm/lib/template.js`:

```
p.render = function(src, model, options, vm) {
  vm = vm || new this.VM();

  var js_beautify = require('js-beautify');
  if (undefined !== js_beautify) {
    var html_beautify = require('js-beautify').html;
  }

  var compiled = this.compile(src, options, vm)(model, vm);

  if (html_beautify !== undefined) {
{'fraction_non_alphanumeric': 0.16973415132924335, 'fraction_numerical': 0.0081799591002045, 'mean_word_length': 3.895, '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': '4485585', 'n_tokens_mistral': 375, 'n_tokens_neox': 351, 'n_words': 79}