Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
<string>#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"

if grep &lt;&lt;&lt;${TM_CURRENT_WORD:-!} -Esq '^[a-zA-Z0-9_]+$'
term=${TM_SELECTED_TEXT:-$TM_CURRENT_WORD}

if grep &lt;&lt;&lt;${term} -Esq '^[a-zA-Z0-9_]+$'
then
if URL=`grep -i "^$TM_CURRENT_WORD=" "$TM_BUNDLE_SUPPORT/documentation.txt"`
then
URL=${URL:${#TM_CURRENT_WORD}+1}
URL=${URL:${#term}+1}
else
URL="function.${TM_CURRENT_WORD//_/-}"
URL="function.${term//_/-}"
fi
if [[ "$PHP_MANUAL_LOCATION" ]]
then
Expand All @@ -26,7 +28,7 @@ if grep &lt;&lt;&lt;${TM_CURRENT_WORD:-!} -Esq '^[a-zA-Z0-9_]+$'
fi
if [[ ! -f "$PHP_MANUAL_LOCATION/$URL.html" ]]
then
exit_show_tool_tip "No documentation found for '$TM_CURRENT_WORD'"
exit_show_tool_tip "No documentation found for '$term'"
fi
. "$TM_SUPPORT_PATH/lib/webpreview.sh"
html_header "PHP Help" "${TM_FILENAME:-}"
Expand All @@ -49,7 +51,7 @@ if grep &lt;&lt;&lt;${TM_CURRENT_WORD:-!} -Esq '^[a-zA-Z0-9_]+$'
historyList.appendChild(item);
item.selected = true;
}

function setupLinks() {
var link, links = document.links;
for (i = 0; i &lt; links.length; i++) {
Expand Down