Skip to content

Instantly share code, notes, and snippets.

@fayimora
Forked from maxlinc/android_lexer.rb
Created February 18, 2016 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fayimora/48674cc7ba6e3b5dabee to your computer and use it in GitHub Desktop.
Save fayimora/48674cc7ba6e3b5dabee to your computer and use it in GitHub Desktop.
Workaround for java vs android in slate
require 'rouge'
module Rouge
module Lexers
class Android < Rouge::Lexers::Java
tag 'android'
end
end
end
# Add this to the top of your config.rb file
require File.expand_path('../android_lexer', __FILE__)
# the rest of your original config.rb file....
title language_tabs toc_footers includes layout
Android Demo
java
android
<a href='#'>Sign Up for a Developer Key</a>
<a href='http://github.com/tripit/slate'>Documentation Powered by Slate</a>
errors
custom_layout

Introduction

Quick proof-of-concept of Android vs Java samples

Hello

These should be highlighted properly:

System.out.println("I am Java!");
System.out.println("Android wins!");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment