<commit_before>---
layout: post
title:  "Jekyll"
date:   2014-03-01 19:58:19
categories: 0.0.1
tags: modules
---
<commit_msg>explain code highlighting adjustments<commit_after>---
layout: post
title:  "Jekyll"
date:   2014-03-01 19:58:19
categories: 0.0.1
tags: modules
---

I do lots of work with Jekyll and I often find myself struggling with the formatting of code snippets.

Princess adjusts padding and margins on the existing Jekyll class and adds a border for cleaner lines. The background color is set to `$gray` and the font size is reduced a little.

These styles will automatically be applied to any Jekyll code snippet using the liquid highlight syntax.

Here's a sample of some Ruby code:

{% highlight ruby %}
class Calculator
  attr_reader :nums

  def push(n)
    @nums ||= []
    @nums << n
  end

  def multiply
    @nums.inject(&:*)
  end

  def add
    @nums.inject(&:+)
  end

  def subtract
    @nums.inject(&:-)
  end

  def clear
    @nums = []
  end

  def remove_last
    @nums.pop(1)
    @nums
  end
end
{% endhighlight %}
{'fraction_non_alphanumeric': 0.09818875119161107, 'fraction_numerical': 0.03336510962821735, 'mean_word_length': 3.183266932270916, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2962829', 'n_tokens_mistral': 390, 'n_tokens_neox': 344, 'n_words': 136}