@@ -251,26 +251,35 @@ COMMANDS *markdown-extras-commands*
251251:MDEConvertLinks Convert inline links into reference-style links.
252252
253253 *:MDEIndex*
254- :MDEIndex [{args} ] Open a popup with all the URLs specified in {args} .
254+ :MDEIndex [{args} ] Open a popup with what is specified in {args} .
255255 The type of {args} can be list<string> , list<list<string> >
256256 or dict<string> . If no argument is passed, then
257257 | g:markdown_extras_indices | is considered.
258258 Example:
259259 >
260- :MDEIndex # Uses g:markdown_extras_indices
261- :MDEIndex ['path1', 'path2', 'path3]
262- :MDEIndex {foo: 'path1', bar: 'path2', baz: 'path3}
263- :MDEIndex [['foo', 'path1'], ['bar', 'path2'], ['baz', 'path3]]
260+ :MDEIndex # Uses g:markdown_extras_indices
261+ :MDEIndex ['local/path', 'some%20url', 'function("some_Funcref")']
262+ :MDEIndex {foo: 'local/path', bar: 'some%20url', 'function("some_Funcref")'}
263+ :MDEIndex [['foo', 'local/path'], ['bar', 'some%20url'],
264+ ['baz', 'function("some_Funcref")']]
264265<
265- Or you can use in a script, like for example:
266+ Or it can be used in a script, like for example:
266267 >
267- const my_index = {
268- foo: '/Users/ubaldot/home/Documents/foo.vim',
269- bar: 'https://example.com',
270- banana: '/mnt/c/files/bar.md'
271- }
272- execute $"MDEIndex {my_index}"
268+ def Foo()
269+ const my_index = {
270+ foo: '/Users/ubaldot/home/Documents/foo.vim',
271+ bar: 'https://example.com',
272+ banana: 'function("g:Foo")'
273+ }
274+ execute $"MDEIndex {my_index}"
275+ enddef
276+
277+ command! MyIndex Foo()
273278<
279+ The string used in the various cases can be a local path,
280+ a valid URL or a function reference.
281+ In the latter case, the referenced function must be global
282+ and shall take no arguments.
274283
275284 *:MDEMake*
276285:MDEMake Invoke | :make | and | :Open | the rendered file. It requires
0 commit comments