       .replace(/@(\b[\w-]+\b)/g, "<a href='#/users/$1'>$1</a>")
 
       # hashtags #tagname
-      .replace(/\#(\w+)/g, "<a href='#/talk/search?query=$1'>#$1</a>")
+      .replace /\#(\w+)/g, (fullTag, tagName) ->
+        if owner and name
+          "<a href='#/projects/#{owner}/#{name}/talk/search?query=#{tagName}'>#{fullTag}</a>"
+        else
+          "<a href='#/talk/search?query=#{tagName}'>#{fullTag}</a>"
 
   markdownify: (input) ->
     markdownIt.render(input)

    header: "Preview"

  replaceSymbols: (string) ->
    string
      # subjects in a specific project : owner-slug/project-slug^subject_id
      # \b[\w-]+\b is hyphen boundary for slugs


module?.exports = React.createClass
  displayName: 'TalkCommentPreview'
  mixins: [State]

  propTypes:
    content: React.PropTypes.string
