Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable automatic link generation from WikiWords #1308

Open
fhoeben opened this issue Nov 16, 2020 · 4 comments
Open

Disable automatic link generation from WikiWords #1308

fhoeben opened this issue Nov 16, 2020 · 4 comments

Comments

@fhoeben
Copy link
Collaborator

fhoeben commented Nov 16, 2020

I often get frustrated in (Slim scripts/scenarios) tests where I need to enter a text that matches the definition of a FitNesse Wiki-word (e.g. SomeUser). I always have to remember to escape such texts (e.g. !-SomeUser-!), to prevent FitNesse from making it a link to a non existing page.

For me the ability to create links using WikiWords (instead of having to make an explicit link) is far less useful than just being able to use such texts without additional escaping in a script table.

I would like the ability to turn off WikiWords links for the entire wiki, or maybe on a suite hierarchy level.

I understand this might be different for other users, and can be a backwards compatibility issue, but it would make my life easier. So the change should be configurable.

I believe I'm not alone in not (always) wanting WikiWords to be turned into link, see also #1307 (comment)

@tcnh
Copy link
Contributor

tcnh commented Nov 20, 2020

Some thoughts about this:

Adding a table prefix like in my example in the referenced PR to the parser's table class is pretty simple.
However, because any symbolTypes defined in plugins are -by default- only registered to the wikiParsingProvider, these would have to be explicitly registered to a new 'no links' Provider as well, or we'd have to let the ContextConfigurator explicitly call loadSymbolTypes for both providers.

What would be the preferred approach? Or is there another option I've overlooked?

I've made a working implementation in #1310 so we can test if that works. To be clear, that PR is an extended version of #1307. Where 1307 only allows extension from plugins, 1310 implements the extension in the Table itself (whilst still leaving it extensible)

@tcnh tcnh mentioned this issue Nov 20, 2020
@jediwhale
Copy link
Collaborator

Some initial thoughts:
In many cases, the automatic generation of links from wikiwords is not useful. It might be helpful to be able to turn this off and use some kind of simple markup to generate links only when wanted, e.g. This is NotAlink but this @Isalink.
Should this be configurable for the entire wiki or by individual pages?
The NoLink table allows very fine control, i.e., at the table level, but only applies to one type of markup.

@jediwhale
Copy link
Collaborator

The alias widget already provides a way to specify a link: [[description][link]]. We could make the description part optional so you could specify a link as [[link]] if auto-linking was turned off. There could be a command line argument to turn auto linking off: something like: -parser noautolink. (This could also be used to enable other parsers, if I ever finish one :). ) This would let you turn off auto-linking for your entire wiki and specify links where you needed them. If you wanted auto-links on some pages, you could leave auto-linking on and use the no-link table and literals to turn them off where required.

@lennyg1
Copy link

lennyg1 commented Nov 24, 2020

What is the problem you're trying to fix here? I haven't noticed any situation where there's a problem aside from within tables for testdata or input.

E-mail, hyperlinks and WiKiWords in tables are a problem when there's a lot of those things in a (script/scenario) table and using a literal table breaks other functionality (like !today). But aside from tables, is there really a need to disable autolinking anywhere else? Are there really any situations where WiKiWord linking is a problem outside of a table?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants