It would be nice if the freelinking filter left codeblocks alone.

Comments

Grayside’s picture

Status: Active » Postponed
nigelcunningham’s picture

Status: Postponed » Needs review
StatusFileSize
new1.62 KB

Here is a patch that implements that. It works by splitting the string to be freelinked into parts, using opening and closing code tags. It then rebuilds the string, applying the original _freelinking_do_filtering function only to parts that fall outside the code tags. Nested code tags are handled correctly.

Works for me with the markdown module, but the markdown module needs to have a lower weight (run first).

nigelcunningham’s picture

StatusFileSize
new1.65 KB

Small correction.

The first version didn't apply the filtering function to text prior to the first opening code tag, and I was too busy focusing on the harder parts of the problem :)

juampynr’s picture

Status: Needs review » Postponed (maintainer needs more info)

Shall we go ahead and work on this? I guess we could make it more flexible by adding a setting in the admin form to ignore text within certain tags (ie. code).

gisle’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (won't fix)

Four years has passed, and there has not been a second request. I'd say this feature does not have enough traction to be worth implementing, given that it makes a complex regexp even more complex.