mirror of
https://github.com/wassname/jupyter_contrib_nbextensions.git
synced 2026-09-13 12:41:02 +08:00
[hinterland] address jfbercher's review notes
This commit is contained in:
@@ -96,7 +96,7 @@ define(function (require, exports, module) {
|
||||
ch: cur.ch - 1
|
||||
}, cur);
|
||||
if ( pre_cursor !== '' &&
|
||||
config.include_regexp.test(pre_cursor) &&
|
||||
(config.include_regexp.test(pre_cursor) || config.tooltip_regexp.test(pre_cursor)) &&
|
||||
!config.exclude_regexp.test(pre_cursor) ) {
|
||||
if (config.tooltip_regexp.test(pre_cursor)) {
|
||||
cell.tooltip.request(cell);
|
||||
@@ -162,11 +162,11 @@ define(function (require, exports, module) {
|
||||
config[regexp_names[ii]] = new RegExp(config[regexp_names[ii]]);
|
||||
}
|
||||
catch (err) {
|
||||
console.warning(log_prefix, 'error parsing', regexp_names[ii] + ':', err);
|
||||
console.warn(log_prefix, 'error parsing', regexp_names[ii] + ':', err);
|
||||
}
|
||||
}
|
||||
}, function on_error (err) {
|
||||
console.warning(log_prefix, 'error loading config:', err);
|
||||
console.warn(log_prefix, 'error loading config:', err);
|
||||
}).then(function on_success () {
|
||||
patch_cell_keyevent();
|
||||
add_menu_item();
|
||||
|
||||
@@ -7,12 +7,12 @@ Description: |
|
||||
only enabling it with tab
|
||||
Compatibility: 4.x
|
||||
Parameters:
|
||||
- name: enable_at_start
|
||||
- name: hinterland.enable_at_start
|
||||
description: |
|
||||
Enable hinterland's continuous hinting when notebook is first opened
|
||||
input_type: checkbox
|
||||
default: true
|
||||
- name: exclude_regexp
|
||||
- name: hinterland.exclude_regexp
|
||||
description: |
|
||||
A regular expression tested against the character before the cursor, which,
|
||||
if a match occurs, prevents autocompletion from being triggered. This is
|
||||
@@ -21,7 +21,7 @@ Parameters:
|
||||
performed.
|
||||
input_type: text
|
||||
default: ':'
|
||||
- name: include_regexp
|
||||
- name: hinterland.include_regexp
|
||||
description: |
|
||||
A regular expression tested against the character before the cursor, which
|
||||
must match in order for autocompletion to be triggered. If left blank, the
|
||||
@@ -29,7 +29,7 @@ Parameters:
|
||||
be modified by kernels, but defaults to /[%0-9a-z._/\\:~-]/i
|
||||
input_type: text
|
||||
default: ''
|
||||
- name: tooltip_regexp
|
||||
- name: hinterland.tooltip_regexp
|
||||
description: |
|
||||
A regular expression tested against the character before the cursor, which
|
||||
if it matches, causes a tooltip to be triggered, instead of regular
|
||||
|
||||
Reference in New Issue
Block a user