From 69ea1d71938940e1b680e39594d0968481ffaf57 Mon Sep 17 00:00:00 2001
From: David Lu <david.lu@hotmail.com>
Date: Fri, 1 Jul 2016 13:14:39 -0400
Subject: removed url on code preview (#3435)

---
 webapp/components/code_preview.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'webapp/components/code_preview.jsx')

diff --git a/webapp/components/code_preview.jsx b/webapp/components/code_preview.jsx
index a0848d14f..5d1a661be 100644
--- a/webapp/components/code_preview.jsx
+++ b/webapp/components/code_preview.jsx
@@ -106,10 +106,12 @@ export default class CodePreview extends React.Component {
 
         const highlighted = SyntaxHighlighting.highlight(this.state.lang, this.state.code);
 
+        const fileName = this.props.filename.substring(this.props.filename.lastIndexOf('/') + 1, this.props.filename.length);
+
         return (
             <div className='post-code'>
                 <span className='post-code__language'>
-                    {`${this.props.filename} - ${language}`}
+                    {`${fileName} - ${language}`}
                 </span>
                 <code className='hljs'>
                     <table>
-- 
cgit v1.2.3-1-g7c22

