From d8e2de75544381e1f92389bad0faa060228d9ede Mon Sep 17 00:00:00 2001 From: Darren Jeacocke Date: Wed, 12 Sep 2012 14:19:06 +1000 Subject: Use block strings --- background_scripts/completion.coffee | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index 5539f7c7..58725fa0 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -29,14 +29,16 @@ class Suggestion relevancyHtml = if @showRelevancy then "#{@computeRelevancy()}" else "" # NOTE(philc): We're using these vimium-specific class names so we don't collide with the page's CSS. @html = - "
- #{@type} - #{@highlightTerms(Utils.escapeHtml(@title))} + """ +
+ #{@type} + #{@highlightTerms(Utils.escapeHtml(@title))}
-
- #{@shortenUrl(@highlightTerms(@url))} +
+ #{@shortenUrl(@highlightTerms(@url))} #{relevancyHtml} -
" +
+ """ shortenUrl: (url) -> @stripTrailingSlash(url).replace(/^http:\/\//, "") @@ -59,7 +61,7 @@ class Suggestion for [start, end] in ranges string = string.substring(0, start) + - "" + string.substring(start, end) + "" + + "#{string.substring(start, end)}" + string.substring(end) string -- cgit v1.2.3