Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13389 closed defect (fixed)

Quote whitespace in wiki page names

Reported by: Ryan J Ollos Owned by: Peter Suter
Priority: normal Component: WikiAutoCompletePlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

TracLinks to a wiki page name with whitespace should be quoted: TracLinks#QuotingspaceinTracLinks.

Attachments (2)

Screen Shot 2018-03-13 at 09.34.09.png (13.5 KB) - added by Ryan J Ollos 7 years ago.
Screen Shot 2018-03-13 at 09.34.30.png (6.7 KB) - added by Ryan J Ollos 7 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by Peter Suter

Is this solved simply by adding this?

  • wikiautocomplete/web_ui.py

    diff -r 519c4a0441aa wikiautocomplete/web_ui.py
    a b  
    156156                "match": r"\bwiki:(\S*)$",
    157157                "name": 'wikipage',
    158158                "index": 1,
     159                "quote_whitespace": True,
    159160                "replace_prefix": 'wiki:',
    160161                "cache": True,
    161162            },

comment:2 Changed 7 years ago by Ryan J Ollos

Yeah, that appears to be all that is needed.

comment:3 Changed 7 years ago by Ryan J Ollos

I can commit that change if you'd like.

comment:4 Changed 7 years ago by Peter Suter

Sure, please go ahead.

comment:5 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 17069:

WikiAutoCompletePlugin: Quote whitespace for wiki TracLinks

Fixes #13389.

comment:6 Changed 7 years ago by Jun Omae

If middle segment of page name has space characters, completion wouldn't work by quoting (e.g. SandBox/Page Name and SandBox/Page Name/Page). It is not useful, a little.

Changed 7 years ago by Ryan J Ollos

Changed 7 years ago by Ryan J Ollos

comment:7 Changed 7 years ago by Ryan J Ollos

Both examples cited in comment:6 are correctly quoted per my testing.

comment:8 Changed 7 years ago by Jun Omae

  1. I wanted to modify the text to SandBox/Page Name/Page after completing [wiki:"SandBox/Page Name", and removed the last double-quote character but autocompletion didn't work.
  2. Typing wiki:SandBox/Page , autocompletion works fine but autocompletion disappears when wiki:SandBox/Page N is typed.

I consider autocompletion should work even if wiki:"... is typed.

Another thing, I think the link included ], ', " should be quoted.

comment:9 Changed 7 years ago by Ryan J Ollos

comment:8 features sound good to me if you want to make a patch.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Peter Suter.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.