I would like to be able to do something like this:

Click [[SomeNode|here]] to visit some node.

Hoping for it to show up as:

Click here to visit some node.

When I try that, it seems the CamelCase filter kicks in first, converting "SomeNode" to a link, but leaving in the rest of the code, so it ends up looking like this:

[[SomeNode|here]]

In other words, if what's on the left of the | character is itself CamelCase (by coincidence or whatever), then the freelinking filter converts that instead of the entire bracketed unit. This seems to happen when either the link target or the link text is valid CamelCase...

Is that supposed to happen?

Comments

eafarris’s picture

Status: Active » Needs review

Could you try changing line 257 to this:

$camelcaseregexp = '/( |^)([[:upper:]][[:lower:]]+){2,}\b/';

And see if that takes care of it? This new RegEx requires the CamelCase to follow a space or beginning of a line. It seems to work in my testing, but I'd like some confirmation before I commit it.

Twylite’s picture

Version: 5.x-1.2 » 6.x-1.0

Oh, but this is just the beginning of your problems ;)

If you then turn off CamelCase linking support in Administer -> Freelinking Settings, you STILL experience the problem, because the hash for the phrase is stored in the freelinking table in the database along with the wrong path.

I see this using 6.x-1.0 and a PostgreSQL database.

Grayside’s picture

Status: Needs review » Needs work

There is apparently no complete, unbugged solution here.

Grayside’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Component: Miscellaneous » Code
Status: Needs work » Fixed

Fixed in -dev. Please test this so the change can be released as part of a Freelinking 1.9.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

anarcat’s picture

I confirm this problem is solved in the dev snapshot.