• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Details

To create a dynamic front page, I use a set of searches, which look for text like:
__Back to [[Specifications]]__
or
__Back to [[Internal Specifications]]__
These are explicitly not WikiWords for management reasons. The first form breaks completely (no workaround), as the WysiwygPlugin converts it to:
__Back to Tools __
The second form is converted to
__Back to [[InternalSpecifications][Internal Specifications]]__
which is irritating, but I can work around it by adding a second search.

Could the plugin be changed to detect forced links, and leave them as links after editing? I can cope if it turns links like Test to Test.

I'm using WysiwygPlugin 0.16

Test Case

Using normal edit, add
[[Test]]Entry
to a page. After a WysiwygPlugin edit, it becomes
Test Entry
(BUG)

Using normal edit, add

[[Test Page]]
to a page. After a WysiwygPlugin edit, it becomes
[[TestPage][Test Page]]
(annoyance only, I can live with it).

Response

This may be a little out-of-order, but I've put together a brief patch that solves my problem; it involves changing HTML2TML/Node.pm:
--- Node.pm.orig        2005-10-21 12:38:51.000000000 +0100
+++ Node.pm     2005-10-21 12:33:01.000000000 +0100
@@ -34,6 +34,8 @@

 package TWiki::Plugins::WysiwygPlugin::HTML2TML::Node;

+use TWiki qw(%regex);
+
 use strict;

 use TWiki::Plugins::WysiwygPlugin::HTML2TML::WC;
@@ -612,8 +614,12 @@
             $cleantext =~ s/(<nop>)//g;
             # if the clean text is the known topic we can ignore it
             if( $cleantext eq $topic || $topic =~ /\.$cleantext$/ ) {
-                # wikiword or web.wikiword
-                return (0, $WC::CHECK1.$nop.$topic.$WC::CHECK2);
+                if($topic =~ $regex{wikiWordRegex}) {
+                    # wikiword or web.wikiword
+                    return (0, $WC::CHECK1.$nop.$topic.$WC::CHECK2);
+                } else {
+                    return (0, $WC::CHECKw.'['.$nop.'['.$topic.']]'.$WC::CHECKw);
+                }
             } else {
                 # text and link differ
                 return (0, $WC::CHECKw.'['.$nop.'['.$topic.']['.$text.

It works for me, but may well need changing to be a more general solution.


SVN 7430 CC

ItemTemplate
Summary Forced links to non-WikiWords are broken during an edit cycle
ReportedBy SimonFarnsworth 21 Oct 2005
AppliesTo Extension
Component WysiwygPlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins 7430
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2005-11-11 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback