Skip to content

Instantly share code, notes, and snippets.

@maxlinc
Created May 8, 2014 04:48
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save maxlinc/3548319e652c83031e49 to your computer and use it in GitHub Desktop.
Save maxlinc/3548319e652c83031e49 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!");
@cheesang
Copy link

cheesang commented May 8, 2014

thanks Max for your swift respond & solution.
I followed steps given & my problem fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment