Permalink
Browse files

Change tm-file: → file:

  • Loading branch information...
1 parent 57d040a commit def37e6d0dc307962cb369f37bb4216bb11aa1cf @infininight infininight committed Aug 26, 2012
@@ -45,7 +45,7 @@ def loadHTMLPage(url,className,methodName, ref)
className = "NSObject" if ref
m = open(url).read.match(/(\#\/\/apple_ref\/[^"]+?\/#{className}\/#{methodName})"/)
url += m[1] if m
- TextMate.exit_show_html "<meta http-equiv='Refresh' content='0;URL=tm-file://#{url}'>"
+ TextMate.exit_show_html "<meta http-equiv='Refresh' content='0;URL=file://#{url}'>"
end
pat = /("(\\.|[^"\\])*"|\[|\]|@selector\([^\)]*\)|[a-zA-Z][a-zA-Z0-9]*:)/
@@ -26,28 +26,28 @@ word=${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}
reference=$(zgrep -w "^$word" "$TM_BUNDLE_SUPPORT/doc_references.txt.gz"|cut -f2)
if [[ -n "$reference" ]]; then
file="$doc_path/$reference"
- [[ -f "${file%#*}" ]] && exit_show_html "<meta http-equiv='Refresh' content='0;URL=tm-file://${file// /%20}'>"
+ [[ -f "${file%#*}" ]] && exit_show_html "<meta http-equiv='Refresh' content='0;URL=file://${file// /%20}'>"
fi
# then see if there's a file named after the word (class)
folders=( "Foundation" "ApplicationKit" "WebKit" )
for (( i = 0; i < ${#folders[@]}; i++ )); do
file="$doc_path/${folders[$i]}/ObjC_classic/Classes/$word.html"
- [[ -f "$file" ]] && exit_show_html "<meta http-equiv='Refresh' content='0;URL=tm-file://${file// /%20}'>"
+ [[ -f "$file" ]] && exit_show_html "<meta http-equiv='Refresh' content='0;URL=file://${file// /%20}'>"
done
# then see if there's a file named after the class in Xcode 2.3 or later
folders=( "Foundation" "ApplicationKit" "WebKit" )
for (( i = 0; i < ${#folders[@]}; i++ )); do
file="$doc_path/${folders[$i]}/Classes/${word}_Class/index.html"
- [[ -f "$file" ]] && exit_show_html "<meta http-equiv='Refresh' content='0;URL=tm-file://${file// /%20}'>"
+ [[ -f "$file" ]] && exit_show_html "<meta http-equiv='Refresh' content='0;URL=file://${file// /%20}'>"
done
# finally try man (PolyglotMan)
try_man () {
if man -w "$word" &>/dev/null; then
page=$("$TM_SUPPORT_PATH/bin/html_man.sh" -a "$word")
- echo "<meta http-equiv='Refresh' content='0;URL=tm-file://$page'>"
+ echo "<meta http-equiv='Refresh' content='0;URL=file://$page'>"
exit_show_html
fi
}
@@ -117,7 +117,7 @@ def show_document (results, query)
end
if url
- full = url =~ /^http:/ ? url : "tm-file://#{url}"
+ full = url =~ /^http:/ ? url : "file://#{url}"
TextMate.exit_show_html "<meta http-equiv='Refresh' content='0;URL=#{full}'>"
else
TextMate.exit_discard

0 comments on commit def37e6

Please sign in to comment.