Is it possible to 'escape' a double bracket in Freelinking? I can't seem to find a way. In most wiki's there is the possibility to use something like <nowiki>...</nowiki> or <code>... or ![[ ... ]] to indicate that the text is not a link.
Is it something that might be implemented?
Comments
Comment #1
simplymenotu commentedHi gmak,
If you don't want to turn CamelCase words into links, you can turn that off.
The default is "on".
You can still use freelinking delimiters ( [[ ) to link text and web sites.
-lgm
Comment #2
gmak commentedI think, perhaps my question wasn't clear.
The specific condition is that I'm trying to create a page which explains how to use 'freelinking'. So I need to write something like:
"to create a link, put [[ ... ]] around the word you wish to link from"
The problem is that the brackets won't appear to the reader, because it will have created a link. So they would see:
"to create a link, put ... around the word you with to link from"
In traditional wiki's you have the ability to 'escape' the double bracket by either a special tag or some escape character. Some examples are:
![[ ... ]]
[[ ... ]]
[[ ... ]]So my question (feature request?) is whether there is a way that we can 'escape' the double brackets?
In looking at the code, it seems like this would be an additional 'if' statement with a regular expression condition, but I'm not enough of a coder to attempt that.
Thanks
Comment #3
gmak commentedOops,
I realise I forgot to format some of the above to show code. The examples are:
![[ ... ]]<nowiki>[[ ... ]] </nowiki><code>[[ ... ]]Comment #4
mtndan commentedHi, was this ever resolved? I've got the same request for version 5
Comment #5
bsherwood commentedJust updating some of the information.
I would also like to know the current status of this. Is there a way to prevent the parsing of freelinking tags on a link by link basis?
Comment #6
arhak commentedwhat about using the html entity unicode for brackets (I don't know which is)
for example, I can write the example of a code block in this comment even when the code tag will be filtered:
<code>some code</code>
that's because I used the "less than" symbol as html entity <
Comment #7
eafarris commentedFixed in freelinking-6.x-1.7.
Comment #9
eafarris commentedWorks, but shows the bang, per #409830: Using ! to show the [[brackets]] in wiki. Re-opening.
Comment #10
Grayside commentedThe bang needs to be replaced when found, instead of simply skipping the segment of text when it finds the bang. The best approach is probably to go back into the text after the "live" freelinks are found and preg_replace the exclamation marks out of the text.
Comment #11
Grayside commentedThis is fixed in 1.x-dev and 3.0-alpha3. Please test 1.x in particular so the fix can be officially released.
Also, 1.x-dev supports "\" as well as "!" to escape the link. The 3.x line currently supports only "\".
Comment #13
timjh commentedA single quote is missing after ...content"... near the end of line 333 of freelinking.module (6.x-1.x-dev on 2010-01-27). The omission causes a PHP syntax error on enabling the module. Once fixed, the module seems to work OK.
should read
Comment #14
Grayside commentedThat seems to be a separate issue, so I'll tackle it in the dedicated issue #702728: Double quote in line 333 causes WSOD.
Comment #15
Sarenc commentedit would be great if this could be re-enabled for 7.x
Comment #16
Sarenc commentedA quick and dirty way to do this:
Basically removes the nowiki text before looking for matches. This isn't idea though, if a match was found outside nowiki tags but the same match existed within the nowiki tags it will be converted. I tried to think of a way to use PREG_OFFSET_CAPTURE but that doesn't make sense. Ideally the nowiki would be excluded in the regex in _freelinking_match_pattern() but I'm not so good with regex :\
Comment #18
gisleThis is fixed in the latest snapshot of the 7.x-3.x branch.
To prevent parsing of
[[text in node, you should tag the freekink with thenowikiindicator.For example:
[[nowiki:this is not a freelink]]wil be rendered as[[this is not a freelink]].Comment #19
gisleThis is included in the 7.x-3.5 release.