From 5f6ebb5cc11b8e6a37376a08e403ab92a4cf2268 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 3 Nov 2016 11:30:46 +0100 Subject: [PATCH] fix incorrect regex for c-like title detection --- www/code/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/code/main.js b/www/code/main.js index cf9864eb1..ee4fd2f0f 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -250,10 +250,10 @@ define([ } // lines including a c-style comment are also valuable - var clike = /^\s*(\/\*|\/\/)(.*?)(\*\/)$/; + var clike = /^\s*(\/\*|\/\/)(.*)?(\*\/)*$/; if (clike.test(line)) { line.replace(clike, function (a, one, two) { - text = two; + text = two.replace(/\*\/\s*$/, '').trim(); }); return true; }