Commit 1f9eafee by Felix Sun

Addressed some minor PR comments.

parent 68bb45ab
......@@ -28,10 +28,6 @@ class @Hinter
$: (selector) ->
$(selector, @el)
jq_escape: (string) =>
# Escape a string for jquery selector use.
return string.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]^`{|}~]/g, '\\$&')
bind: =>
@$('input.vote').click @vote
@$('input.submit-hint').click @submit_hint
......@@ -99,7 +95,7 @@ class @Hinter
render: (content) ->
if content
# Trim leading and trailing whitespace
content = content.replace /^\s+|\s+$/g, ""
content = content.trim()
if content
@el.html(content)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment