Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

don't always wiki-link to the edit page, and allow [word] as wiki-lin…

…k syntax as well. better-looking headers within page content area and lists.
  • Loading branch information...
commit 378318561db0c4040dd06ae285a4455e472e6657 1 parent 3e255d9
@al3x authored
Showing with 15 additions and 2 deletions.
  1. +5 −1 extensions.rb
  2. +10 −1 public/style.css
View
6 extensions.rb
@@ -8,7 +8,11 @@ def require_gem_with_feedback(gem)
class String
def wiki_linked
- self.gsub!(/\b((?:[A-Z]\w+){2,})/) { |m| "<a href=\"/e/#{m}\">#{m}</a>" }
+ self.gsub!(/\b((?:[A-Z]\w+){2,})/) { |m| "<a href=\"/#{m}\">#{m}</a>" }
+ self.gsub!(/\[(\w+){2,}\]/) { |m|
+ m.gsub!(/(\[|\])/, '')
+ "<a href=\"/#{m}\">#{m}</a>"
+ }
self
end
end
View
11 public/style.css
@@ -48,7 +48,7 @@ textarea {
ul {
list-style-type: square;
- padding: 0;
+ padding: 0 0 0 1.2em;
}
/* classes */
@@ -68,6 +68,15 @@ ul {
padding: 10px 10px 2px 10px;
}
+.content h1, .content h2, .content h3, .content h4 {
+ padding: 0 0 0 0;
+ margin: 0 0 0 0;
+}
+.content h1 { font-size: 2.4em; }
+.content h2 { font-size: 2.2em; }
+.content h3 { font-size: 2em; }
+.content h4 { font-size: 1.8em; }
+
.delta {
font-size: 1.1em;
padding: 0;
Please sign in to comment.
Something went wrong with that request. Please try again.