Skip to content

Commit

Permalink
add markdown extension
Browse files Browse the repository at this point in the history
  • Loading branch information
fuktommy committed Nov 27, 2015
1 parent ccc947b commit a1e0e43
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 1 deletion.
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ SUCH DAMAGE.

See also
* jinja2/LICENSE
* doc/marked.LICENSE.txt
* doc/spoiler-alert.README.md
* www/bootstrap/css/bootstrap.min.css
* www/jquery/MIT-LICENSE.txt
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Authors
* (thumbnail patch) A shinGETsu user.
* (imghdr patch) A shinGETsu user.
* (js extensions) shinGETsu users.
* (markdown extension) WhiteCat6142

Contributers
------------
Expand All @@ -20,6 +21,7 @@ Contributers
* (Twitter Bootstrap) Twitter.
* (jQuery Lazy) Daniel 'Eisbehr' Kern
* (Spoiler Alert) Joshua Hull, Jared Volpe, Dwayne Charrington
* (marked) Christopher Jeffrey

WebSite
-------
Expand Down
2 changes: 1 addition & 1 deletion doc/apache.sample
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
RewriteRule server.cgi - [F]
RewriteRule ^([0-9_][^/]*).js$ /STATIC/$1.js
RewriteRule ^([0-9_][^/]*).css$ /STATIC/$1.css
RewriteRule ^(bootstrap|jquery)/(.*) /STATIC/$1/$2
RewriteRule ^(bootstrap|contrib|jquery)/(.*) /STATIC/$1/$2
RewriteRule ^favicon.ico$ /STATIC/favicon.ico
RewriteRule ^x.gif$ /STATIC/x.gif
RewriteRule rss1.xsl /STATIC/rss1.xsl
Expand Down
19 changes: 19 additions & 0 deletions doc/marked.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def setup_data_files():
globcat("www/*.css", os.path.join(www_dir, '__merged.css'))
globcat("www/*.js", os.path.join(www_dir, '__merged.js'))
copytree("www/bootstrap", os.path.join(www_dir, 'bootstrap'))
copytree("www/contrib", os.path.join(www_dir, 'contrib'))
copytree("www/jquery", os.path.join(www_dir, 'jquery'))

globcopy("README*", doc_dir)
Expand Down
18 changes: 18 additions & 0 deletions www/20markdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* -*- coding: utf-8 -*-
* markdown extension
* https://github.com/WhiteCat6142/shingetsu-extensons
*/

shingetsu.initialize(function () {

function onload() {
$.each($("dd"),function(i,ele) {
var t = $(ele).text();
if (t.startsWith("@markdown")) {
$(ele).html(marked(t.substring("@markdown".length)));
}
});
}

shingetsu.addScriptPath('contrib/marked.min.js', onload);
});
6 changes: 6 additions & 0 deletions www/contrib/marked.min.js

Large diffs are not rendered by default.

0 comments on commit a1e0e43

Please sign in to comment.