Skip to content

Commit

Permalink
make file paths clickable that don't start with a slash (#120)
Browse files Browse the repository at this point in the history
by achoring based on the double quote enclosing the path instead of
using the forward slash.
  • Loading branch information
chrono authored and avelis committed Jul 6, 2016
1 parent 48b7416 commit 5f407a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion silk/templatetags/silk_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def spacify(value, autoescape=None):


def _urlify(str):
r = re.compile("(?P<src>/.*\.py)\", line (?P<num>[0-9]+).*")
r = re.compile('"(?P<src>.*\.py)", line (?P<num>[0-9]+).*')
m = r.search(str)
while m:
group = m.groupdict()
Expand Down
2 changes: 1 addition & 1 deletion silk/views/sql_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _code_context(file_path, line_num):
class SQLDetailView(View):
def _urlify(self, str):
files = []
r = re.compile("(?P<src>/.*\.py)\", line (?P<num>[0-9]+).*")
r = re.compile('"(?P<src>.*\.py)", line (?P<num>[0-9]+).*')
m = r.search(str)
n = 1
while m:
Expand Down

0 comments on commit 5f407a9

Please sign in to comment.