This commit is contained in:
xmcp
2018-08-26 23:11:43 +08:00
parent 465521a6c8
commit 32883e4bbd
5 changed files with 27 additions and 12 deletions

View File

@@ -46,7 +46,7 @@ export class HighlightedText extends PureComponent {
<pre>
{parts.map((p,idx)=>(
<span key={idx}>{
PID_RE.test(p) ? <a onClick={()=>{this.props.show_pid(p)}}>{p}</a> :
PID_RE.test(p) ? <a href={'##'+p} onClick={(e)=>{e.preventDefault(); this.props.show_pid(p);}}>{p}</a> :
NICKNAME_RE.test(p) ? <span style={{backgroundColor: this.props.color_picker.get(p)}}>{p}</span> :
p
}</span>