Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed links on quickref pages.

  • Loading branch information...
commit 505a58fbeec82f86ca9a6a6dee3a52d83d74d9e7 1 parent 190e95e
@zk authored
View
14 app/helpers/application_helper.rb
@@ -54,5 +54,19 @@ def time_ago_or_time_stamp(from_time, to_time = Time.now, include_seconds = true
return time_stamp(from_time) if (detail && distance_in_minutes > 2880)
return time
end
+
+ def make_url_friendly(name)
+ out = name.gsub("?","_q").
+ gsub("/","_").
+ gsub(" ","_").
+ downcase
+
+ if name =~ /^\.+$/
+ out = out.gsub(".", "_dot")
+ end
+
+ out
+ end
+
end
View
6 app/views/main/clojure_core_shortdesc.html.erb
@@ -72,10 +72,8 @@
<table>
<tr class="var">
<td class="var">
- <% if sym[:link] and sym[:link] != "" %>
- <a href="/clojure_core/<%= sym[:ns]
- %>/<%= sym[:name]%>"><%= sym[:name]
- %></a>
+ <% if sym[:link] and sym[:link] != "" %>
+ <a href="/clojure_core/<%= sym[:ns]%>/<%= make_url_friendly(sym[:name])%>"><%= sym[:name]%></a>
<% else %>
<%= sym[:name] %>
<% end %>
View
2  app/views/main/clojure_core_vars_only.html.erb
@@ -56,7 +56,7 @@
<td>
<% g[:symbols].each do |sym| %>
<% if sym[:link] and sym[:link] != "" %>
- <a href="<%= sym[:link] %>"><%= sym[:name] %></a>
+ <a href="/clojure_core/<%= sym[:ns]%>/<%= make_url_friendly(sym[:name])%>"><%= sym[:name]%></a>
<% else %>
<%= sym[:name] %>
<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.