Skip to content

Instantly share code, notes, and snippets.

View mojavelinux's full-sized avatar

Dan Allen mojavelinux

View GitHub Profile
@mojavelinux
mojavelinux / angular-localizer-treeprocessor.rb
Last active March 7, 2017 17:17 — forked from jaredmcateer/wrap-text-with-filter.rb
An Asciidoctor treeprocessor that wraps text content in Angular's localize filter.
#!/usr/bin/env ruby
require 'asciidoctor/extensions'
class AngularLocalizerTreeprocessor < Asciidoctor::Extensions::Treeprocessor
def process document
document.blocks? ? (localize_blocks document) : nil
end
def localize_blocks node
@mojavelinux
mojavelinux / Writing Tools Writeup.markdown
Created January 30, 2012 18:56 — forked from matthewmccullough/Writing Tools Writeup.md
How To Write A Technical Book (One Man's Modest Suggestions)