Skip to content

Commit

Permalink
URI fragments for Erlang and Elixir work as-is now
Browse files Browse the repository at this point in the history
  • Loading branch information
sunaku committed Jan 25, 2016
1 parent f49eade commit 02c9c58
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions bin/dasht-query-line
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,12 @@ dasht-docsets "$@" | while read docset; do
# indicate the source of this result
print "from = " docset
# URI fragments are sometimes wrong
# or entirely missing; fix them here
# skip navigation links in CSS docset
# when URI fragment is not available
if (docset ~ /^CSS/ && $3 !~ "#.+") {
$3 = $3 "#wiki-content"
}
if (docset ~ /^Erlang|^Elixir/) {
sub("#//apple_ref/[^/]+/", "#", $3)
}
if (docset ~ /^Erlang/) {
gsub("%2F", "-", $3)
gsub("%5F", "_", $3)
}
if (docset ~ /^Elixir/) {
gsub("%2F", "/", $3)
}
# resolve URL to filesystem location
$3 = file_url $3
}
Expand Down

0 comments on commit 02c9c58

Please sign in to comment.