In CudaExt exists command "Navigate - Open file by selected name".
Local markdown files with links with spaces can contain "%20", that command does not open.
Example:
Code: Select all
[Example](../Files/Example%20Test.md)
Code: Select all
for bs_dir in bs_dirs:
op_file = os.path.join(bs_dir, pointed)
op_row = -1
if not os.path.isfile(op_file) and \
'(' in op_file: #)
# Try to split in 'path(row' #)
mtch= re.search(r'(.*)\((\d+)', op_file)
if mtch:
pointed_,op_row = mtch.groups()
op_row = int(op_row)
op_file = os.path.join(bs_dir, pointed_)
if os.path.isfile(op_file):
op_ed = _file_open(op_file)
op_ed.focus()
if op_row!=-1:
op_ed.set_caret(0, op_row)
break#for
### ++++++++++++++++++
op_file_norm = op_file.replace("%20", " ")
if not os.path.isfile(op_file_norm) and \
'(' in op_file_norm: #)
# Try to split in 'path(row' #)
mtch= re.search(r'(.*)\((\d+)', op_file_norm)
if mtch:
pointed_,op_row = mtch.groups()
op_row = int(op_row)
op_file_norm = os.path.join(bs_dir, pointed_)
if os.path.isfile(op_file_norm):
op_ed = _file_open(op_file_norm)
op_ed.focus()
if op_row!=-1:
op_ed.set_caret(0, op_row)
break#for
### --------------------------
If possible, please add a treatment for this situation