Update live preview and gemspec.

This commit is contained in:
bootstraponline
2012-05-03 17:22:34 -06:00
parent 7649abf86a
commit 9a89a16388
11 changed files with 208 additions and 20 deletions
+76 -1
View File
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
s.name = 'gollum'
s.version = '1.4.3'
s.date = '2012-04-25'
s.date = '2012-05-03'
s.rubyforge_project = 'gollum'
s.summary = "A simple, Git-powered wiki."
@@ -75,6 +75,80 @@ Gem::Specification.new do |s|
lib/gollum/frontend/public/gollum/javascript/gollum.placeholder.js
lib/gollum/frontend/public/gollum/javascript/jquery.color.js
lib/gollum/frontend/public/gollum/javascript/jquery.js
lib/gollum/frontend/public/gollum/livepreview/css/custom.css
lib/gollum/frontend/public/gollum/livepreview/css/gollum/template.css
lib/gollum/frontend/public/gollum/livepreview/css/highlightjs/github.css
lib/gollum/frontend/public/gollum/livepreview/images/lr_24.png
lib/gollum/frontend/public/gollum/livepreview/images/save_24.png
lib/gollum/frontend/public/gollum/livepreview/index.html
lib/gollum/frontend/public/gollum/livepreview/js/ace/ace.js
lib/gollum/frontend/public/gollum/livepreview/js/ace/mode-markdown.js
lib/gollum/frontend/public/gollum/livepreview/js/ace/theme-twilight.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/highlight.pack.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/1c.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/actionscript.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/apache.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/avrasm.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/axapta.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/bash.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/cmake.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/coffeescript.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/cpp.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/cs.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/css.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/d.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/delphi.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/diff.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/django.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/dos.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/erlang-repl.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/erlang.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/go.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/haskell.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/http.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/ini.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/java.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/javascript.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/lisp.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/lua.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/markdown.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/matlab.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/mel.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/nginx.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/objectivec.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/parser3.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/perl.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/php.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/profile.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/python.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/r.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/renderman.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/ruby.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/rust.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/scala.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/smalltalk.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/sql.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/tex.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/vala.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/vbscript.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/vhdl.js
lib/gollum/frontend/public/gollum/livepreview/js/highlightjs/languages/xml.js
lib/gollum/frontend/public/gollum/livepreview/js/jquery/jquery-1.7.2.min.js
lib/gollum/frontend/public/gollum/livepreview/js/pagedown/Markdown.Converter.js
lib/gollum/frontend/public/gollum/livepreview/js/pagedown/Markdown.Sanitizer.js
lib/gollum/frontend/public/gollum/livepreview/licenses/ace/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/bootstraponline_gollum/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/gollum/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/highlightjs/AUTHORS.en.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/highlightjs/AUTHORS.ru.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/highlightjs/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/jquery/MIT-LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/licenses.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/notepages/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/pagedown/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/retina_display_icon_set/by_sa_3.0_unported_legalcode.txt
lib/gollum/frontend/public/gollum/livepreview/licenses/sizzle/LICENSE.txt
lib/gollum/frontend/public/gollum/livepreview/readme.md
lib/gollum/frontend/templates/compare.mustache
lib/gollum/frontend/templates/create.mustache
lib/gollum/frontend/templates/edit.mustache
@@ -86,6 +160,7 @@ Gem::Specification.new do |s|
lib/gollum/frontend/templates/pages.mustache
lib/gollum/frontend/templates/search.mustache
lib/gollum/frontend/templates/searchbar.mustache
lib/gollum/frontend/uri_encode_component.rb
lib/gollum/frontend/views/compare.rb
lib/gollum/frontend/views/create.rb
lib/gollum/frontend/views/edit.rb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
define("ace/theme/twilight",["require","exports","module","ace/lib/dom"],function(a,b,c){b.isDark=!0,b.cssClass="ace-twilight",b.cssText=".ace-twilight .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-twilight .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-twilight .ace_gutter { background: #e8e8e8; color: #333;}.ace-twilight .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-twilight .ace_scroller { background-color: #141414;}.ace-twilight .ace_text-layer { cursor: text; color: #F8F8F8;}.ace-twilight .ace_cursor { border-left: 1px solid #A7A7A7;}.ace-twilight .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #A7A7A7;}.ace-twilight .ace_marker-layer .ace_selection { background: rgba(221, 240, 255, 0.20);}.ace-twilight .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-twilight .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.25);}.ace-twilight .ace_marker-layer .ace_active_line { background: rgba(255, 255, 255, 0.031);}.ace-twilight .ace_marker-layer .ace_selected_word { border: 1px solid rgba(221, 240, 255, 0.20);}.ace-twilight .ace_invisible { color: rgba(255, 255, 255, 0.25);}.ace-twilight .ace_keyword, .ace-twilight .ace_meta { color:#CDA869;}.ace-twilight .ace_constant, .ace-twilight .ace_constant.ace_other { color:#CF6A4C;}.ace-twilight .ace_constant.ace_character, { color:#CF6A4C;}.ace-twilight .ace_constant.ace_character.ace_escape, { color:#CF6A4C;}.ace-twilight .ace_invalid.ace_illegal { color:#F8F8F8;background-color:rgba(86, 45, 86, 0.75);}.ace-twilight .ace_invalid.ace_deprecated { text-decoration:underline;font-style:italic;color:#D2A8A1;}.ace-twilight .ace_support { color:#9B859D;}.ace-twilight .ace_support.ace_constant { color:#CF6A4C;}.ace-twilight .ace_fold { background-color: #AC885B; border-color: #F8F8F8;}.ace-twilight .ace_support.ace_function { color:#DAD085;}.ace-twilight .ace_storage { color:#F9EE98;}.ace-twilight .ace_variable { color:#AC885B;}.ace-twilight .ace_string { color:#8F9D6A;}.ace-twilight .ace_string.ace_regexp { color:#E9C062;}.ace-twilight .ace_comment { font-style:italic;color:#5F5A60;}.ace-twilight .ace_variable { color:#7587A6;}.ace-twilight .ace_xml_pe { color:#494949;}.ace-twilight .ace_meta.ace_tag { color:#AC885B;}.ace-twilight .ace_entity.ace_name.ace_function { color:#AC885B;}.ace-twilight .ace_markup.ace_underline { text-decoration:underline;}.ace-twilight .ace_markup.ace_heading { color:#CF6A4C;}.ace-twilight .ace_markup.ace_list { color:#F9EE98;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)})
define("ace/theme/twilight",["require","exports","module","ace/lib/dom"],function(a,b,c){b.isDark=!0,b.cssClass="ace-twilight",b.cssText=".ace-twilight .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-twilight .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-twilight .ace_gutter { background: #e8e8e8; color: #333;}.ace-twilight .ace_print_margin { width: 1px; background: #e8e8e8;}.ace-twilight .ace_scroller { background-color: #141414;}.ace-twilight .ace_text-layer { cursor: text; color: #F8F8F8;}.ace-twilight .ace_cursor { border-left: 2px solid #A7A7A7;}.ace-twilight .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #A7A7A7;}.ace-twilight .ace_marker-layer .ace_selection { background: rgba(221, 240, 255, 0.20);}.ace-twilight.multiselect .ace_selection.start { box-shadow: 0 0 3px 0px #141414; border-radius: 2px;}.ace-twilight .ace_marker-layer .ace_step { background: rgb(198, 219, 174);}.ace-twilight .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.25);}.ace-twilight .ace_marker-layer .ace_active_line { background: rgba(255, 255, 255, 0.031);}.ace-twilight .ace_marker-layer .ace_selected_word { border: 1px solid rgba(221, 240, 255, 0.20);}.ace-twilight .ace_invisible { color: rgba(255, 255, 255, 0.25);}.ace-twilight .ace_keyword, .ace-twilight .ace_meta { color:#CDA869;}.ace-twilight .ace_constant, .ace-twilight .ace_constant.ace_other { color:#CF6A4C;}.ace-twilight .ace_constant.ace_character, { color:#CF6A4C;}.ace-twilight .ace_constant.ace_character.ace_escape, { color:#CF6A4C;}.ace-twilight .ace_invalid.ace_illegal { color:#F8F8F8;background-color:rgba(86, 45, 86, 0.75);}.ace-twilight .ace_invalid.ace_deprecated { text-decoration:underline;font-style:italic;color:#D2A8A1;}.ace-twilight .ace_support { color:#9B859D;}.ace-twilight .ace_support.ace_constant { color:#CF6A4C;}.ace-twilight .ace_fold { background-color: #AC885B; border-color: #F8F8F8;}.ace-twilight .ace_support.ace_function { color:#DAD085;}.ace-twilight .ace_storage { color:#F9EE98;}.ace-twilight .ace_variable { color:#AC885B;}.ace-twilight .ace_string { color:#8F9D6A;}.ace-twilight .ace_string.ace_regexp { color:#E9C062;}.ace-twilight .ace_comment { font-style:italic;color:#5F5A60;}.ace-twilight .ace_variable { color:#7587A6;}.ace-twilight .ace_xml_pe { color:#494949;}.ace-twilight .ace_meta.ace_tag { color:#AC885B;}.ace-twilight .ace_entity.ace_name.ace_function { color:#AC885B;}.ace-twilight .ace_markup.ace_underline { text-decoration:underline;}.ace-twilight .ace_markup.ace_heading { color:#CF6A4C;}.ace-twilight .ace_markup.ace_list { color:#F9EE98;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)})
File diff suppressed because one or more lines are too long
@@ -82,7 +82,6 @@ hljs.LANGUAGES.coffeescript = function() {
};
var COFFEE_EMBEDDED_JAVASCRIPT = {
className: 'javascript',
begin: '`', end: '`',
excludeBegin: true, excludeEnd: true,
subLanguage: 'javascript'
@@ -92,7 +91,7 @@ hljs.LANGUAGES.coffeescript = function() {
defaultMode: {
keywords: keywords,
contains: [
// Numbers
// Numbers
hljs.C_NUMBER_MODE,
hljs.BINARY_NUMBER_MODE,
// Strings
@@ -0,0 +1,31 @@
/*
Language: HTTP
Description: HTTP request and response headers with automatic body highlighting
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
*/
hljs.LANGUAGES.http = {
defaultMode: {
illegal: '\\S',
contains: [
{
className: 'title',
begin: '^HTTP/[0-9\\.]+', end: '$',
},
{
className: 'title',
begin: '^[A-Z]+ .*?HTTP/[0-9\\.]+$',
},
{
className: 'header',
begin: '^\\w', end: ': ', excludeEnd: true,
illegal: '\\n',
starts: {className: 'value', end: '$'}
},
{
begin: '\\n\\n',
starts: {subLanguage: '', end: hljs.EOF_RE}
}
]
}
}
@@ -6,7 +6,7 @@ Author: Oleg Volchkov <oleg@volchkov.net>
hljs.LANGUAGES.parser3 = {
defaultMode: {
subLanguage: 'html',
subLanguage: 'xml',
contains: [
{
className: 'comment',
@@ -0,0 +1,84 @@
/*
Language: R
Author: Joe Cheng <joe@rstudio.org>
*/
hljs.LANGUAGES.r = (function() {
var IDENT_RE = '([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*';
return {
defaultMode: {
contains: [
hljs.HASH_COMMENT_MODE,
{
begin: IDENT_RE,
lexems: IDENT_RE,
keywords: {
'keyword': {
'function' : 1, 'if' : 1, 'in' : 1, 'break' : 1, 'next' : 1, 'repeat' : 1, 'else' : 1, 'for' : 1,
'return' : 1, 'switch' : 1, 'while' : 1, 'try' : 1, 'tryCatch' : 10, 'stop' : 1, 'warning' : 1,
'require' : 1, 'library' : 1, 'attach' : 1, 'detach' : 1, 'source' : 1, 'setMethod' : 1,
'setGeneric' : 1, 'setGroupGeneric' : 1, 'setClass' : 1, '...' : 10
},
'literal': {'NULL': 1, 'NA': 1, 'TRUE': 1, 'FALSE': 1, 'T': 1, 'F': 1, 'Inf': 1, 'NaN': 1,
'NA_integer_': 10, 'NA_real_': 10, 'NA_character_': 10, 'NA_complex_': 10}
},
relevance: 0
},
{
// hex value
className: 'number',
begin: "0[xX][0-9a-fA-F]+[Li]?\\b",
relevance: 0
},
{
// explicit integer
className: 'number',
begin: "\\d+(?:[eE][+\\-]?\\d*)?L\\b",
relevance: 0
},
{
// number with trailing decimal
className: 'number',
begin: "\\d+\\.(?!\\d)(?:i\\b)?",
relevance: 0
},
{
// number
className: 'number',
begin: "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
},
{
// number with leading decimal
className: 'number',
begin: "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",
relevance: 0
},
{
// escaped identifier
begin: '`',
end: '`',
relevance: 0
},
{
className: 'string',
begin: '"',
end: '"',
contains: [hljs.BACKSLASH_ESCAPE],
relevance: 0
},
{
className: 'string',
begin: "'",
end: "'",
contains: [hljs.BACKSLASH_ESCAPE],
relevance: 0
},
]
}
};
})();
@@ -72,7 +72,6 @@ hljs.LANGUAGES.xml = function(){
keywords: {'title': {'style': 1}},
contains: [TAG_INTERNALS],
starts: {
className: 'css',
end: '</style>', returnEnd: true,
subLanguage: 'css'
}
@@ -84,13 +83,11 @@ hljs.LANGUAGES.xml = function(){
keywords: {'title': {'script': 1}},
contains: [TAG_INTERNALS],
starts: {
className: 'javascript',
end: '</script>', returnEnd: true,
subLanguage: 'javascript'
}
},
{
className: 'vbscript',
begin: '<%', end: '%>',
subLanguage: 'vbscript'
},
@@ -1,6 +1,6 @@
Client side live preview of Markdown for Gollum with syntax highlighting.
[Click for demo](http://bootstraponline.github.com/livepreview/)
[Click for demo.](http://bootstraponline.github.com/livepreview/)
Uses code/assets from:
@@ -18,27 +18,29 @@ See licenses folder for details.
# Dependency Notes
## Ace
Using master branch at `4905bd45c462eec14f552fbbd282eb1fd76b6aa4`. Download files to `/livepreview/js/ace/`.
Using master branch at [c9c811794f46a3d53b2171bc46e25e613d07d7aa](https://github.com/ajaxorg/ace/commit/c9c811794f46a3d53b2171bc46e25e613d07d7aa). Download files to: `/livepreview/js/ace/`
# working directory is /livepreview/js/ace/
rm ace.js mode-markdown.js theme-twilight.js ;\
wget https://raw.github.com/ajaxorg/ace/master/build/src/ace.js ;\
wget https://raw.github.com/ajaxorg/ace/master/build/src/mode-markdown.js ;\
wget https://raw.github.com/ajaxorg/ace/master/build/src/theme-twilight.js
## Building highlightjs
- Using master branch at `9a531974d3ebb3cd5c9c6c929fa7184a9852f560`.
- Using master branch at [237bc62f72065184b63a6fe1823912e4833d3068](https://github.com/isagalaev/highlight.js/commit/237bc62f72065184b63a6fe1823912e4833d3068).
- `isagalaev-highlight.js/tools$ python build.py`
- Copy highlight.pack.js and languages folder to `/livepreview/js/highlightjs/`
- Copy highlight.pack.js and languages folder to: `/livepreview/js/highlightjs/`
- Move `isagalaev-highlight.js/src/styles/github.css` to `/livepreview/css/highlightjs/`
- Note that github.css has been customized and should not be replaced when updating the highlightjs dependency.
- Note that github.css (`isagalaev-highlight.js/src/styles/github.css` -> `/livepreview/css/highlightjs/`) has been customized and should not be replaced when updating the highlightjs dependency.
## jQuery & Sizzle
Using v1.7.2
Download latest production version from http://jquery.com
Using jQuery v1.7.2.
- Download latest production version from [jquery.com](http://www.jquery.com).
## Pagedown
The Pagedown code used is from revision `44a4db795617`, Mar 2, 2012 (currently the newest version at the time of writing this document). Markdown.Converter.js has been enhanced to support Gollum style code highlighting.
`https://code.google.com/p/pagedown/source/detail?r=44a4db795617288ae9817c90735fb497891ede23`