|
@@ -938,24 +938,21 @@ var configuratorApp = (function(){
|
938
|
938
|
// Success?
|
939
|
939
|
if (info.type) {
|
940
|
940
|
// Get the end-of-line comment, if there is one
|
941
|
|
- var tooltip = '';
|
|
941
|
+ var tooltip = '', eoltip = '';
|
942
|
942
|
findDef = new RegExp('.*#define[ \\t].*/[/*]+[ \\t]*(.*)');
|
943
|
943
|
if (info.line.search(findDef) >= 0)
|
944
|
|
- tooltip = info.line.replace(findDef, '$1');
|
|
944
|
+ eoltip = tooltip = info.line.replace(findDef, '$1');
|
945
|
945
|
|
946
|
946
|
// Get all the comments immediately before the item
|
947
|
947
|
var r, s;
|
948
|
|
- findDef = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})([ \\t]*\n)?' + info.line.regEsc(), 'g');
|
|
948
|
+ findDef = new RegExp('(([ \\t]*(//|#)[^\n]+\n){1,4})' + info.line.regEsc(), 'g');
|
949
|
949
|
if (r = findDef.exec(txt)) {
|
950
|
950
|
// Get the text of the found comments
|
951
|
951
|
findDef = new RegExp('^[ \\t]*//+[ \\t]*(.*)[ \\t]*$', 'gm');
|
952
|
952
|
while((s = findDef.exec(r[1])) !== null) {
|
953
|
|
- var tip = s[1].replace(/[ \\t]*(={5,}|@section[ \\t]+\w+)[ \\t]*/g, '');
|
|
953
|
+ var tip = s[1].replace(/[ \\t]*(={5,}|(#define[ \\t]+.*|@section[ \\t]+\w+))[ \\t]*/g, '');
|
954
|
954
|
if (tip.length) {
|
955
|
|
- if (tip.match(/^#define[ \\t]/) != null) {
|
956
|
|
- tooltip = '';
|
957
|
|
- break;
|
958
|
|
- }
|
|
955
|
+ if (tip.match(/^#define[ \\t]/) != null) tooltip = eoltip;
|
959
|
956
|
// JSON data? Save as select options
|
960
|
957
|
if (!info.options && tip.match(/:[\[{]/) != null) {
|
961
|
958
|
// TODO
|