Posted by gmak on September 17, 2006 at 10:55pm
9 followers
Jump to:
| Project: | freelinking |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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 there a way to do this in Freelinking? If not, is it something that might be implemented?
thanks
Comments
#1
Hi 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
#2
I 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
#3
Oops,
I realise I forgot to format some of the above to show code. The examples are:
![[ ... ]]<nowiki>[[ ... ]] </nowiki><code>[[ ... ]]#4
Hi, was this ever resolved? I've got the same request for version 5
#5
Just 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?
#6
what 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 <
#7
Fixed in freelinking-6.x-1.7.
#8
Automatically closed -- issue fixed for two weeks with no activity.
#9
Works, but shows the bang, per #409830: Using ! to show the [[brackets]] in wiki. Re-opening.
#10
The 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.
#11
This 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 "\".
#12
Automatically closed -- issue fixed for 2 weeks with no activity.
#13
A 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.
$output .= '<li>' . t('[[this is the target|this is the source]] - will present "this is the source" as a link to "this is the target", or a page to create that content.") . '</li>';should read
$output .= '<li>' . t('[[this is the target|this is the source]] - will present "this is the source" as a link to "this is the target", or a page to create that content."') . '</li>';#14
That seems to be a separate issue, so I'll tackle it in the dedicated issue #702728: Double quote in line 333 causes WSOD.