Skip to content

Commit

Permalink
Item14253: Don't insert extra white space before [[links]]
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed Dec 19, 2016
1 parent c792dc7 commit ec987f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions WysiwygPlugin/data/System/WysiwygPlugin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1480177564" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1482155911" format="1.1" version="1"}%
%META:TOPICPARENT{name="Plugins"}%
---+!! Wysiwyg Plugin
<!--
Expand Down Expand Up @@ -187,7 +187,8 @@ Many thanks to the following sponsors for supporting this work:
| Copyright | &copy; ILOG 2005 http://www.ilog.fr %BR% \
&copy; 2008-2015 Foswiki Contributors |
| Change History: | |
| 1.34 (26 Nov 2016) | Released with Foswiki 2.1.3 Foswikitask:Item14078: Wysiwyg merges horizontal rules (---) into a preceeding list and looses the TML markup. |
| 1.34 (26 Nov 2016) | Released with Foswiki 2.1.3 Foswikitask:Item14078: Wysiwyg merges horizontal rules (---) into a preceeding list and looses the TML markup.<br />\
Foswikitask:Item14253: WysiwygPlugin inserts extra spaces in front of square bracket links. |
| 1.33 (08 Apr 2016) | Released with Foswiki 2.1.1 Foswikitask:Item13960: Editor fails to preserve alignment of cells containing "0".<br/>\
Foswikitask:Item13957: Fix rendering of empty "indent" lines<br/>\
Foswikitask:Item13958: Don't remove empty lines between two indent blocks. |
Expand Down Expand Up @@ -279,4 +280,4 @@ Many thanks to the following sponsors for supporting this work:
%META:FIELD{name="Support" title="Support" value="http://foswiki.org/Support/%25$ROOTMODULE%25"}%
%META:FIELD{name="Version" title="Version" value="%25$VERSION%25"}%
%META:FIELD{name="Repository" title="Repository" value="https://github.com/foswiki/distro"}%
%META:FILEATTACHMENT{name="wikiringlogo20x20.png" attr="h" comment="" date="1480177564" size="1343" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="wikiringlogo20x20.png" attr="h" comment="" date="1482155911" size="1343" user="ProjectContributor" version="1"}%
Expand Up @@ -1534,7 +1534,7 @@ sub _handleA {

#print STDERR "TEXT ($text) HREF ($href)\n";
if ( $text eq $href ) {
return ( 0, $WC::CHECKw . '[' . $nop . '[' . $href . ']]' );
return ( 0, '[' . $nop . '[' . $href . ']]' );
}

# we must quote square brackets in [[...][...]] notation
Expand All @@ -1543,8 +1543,7 @@ sub _handleA {
$href =~ s/[[]/%5B/g;
$href =~ s/[]]/%5D/g;

return ( 0,
$WC::CHECKw . '[' . $nop . '[' . $href . '][' . $text . ']]' );
return ( 0, '[' . $nop . '[' . $href . '][' . $text . ']]' );
}
elsif ( $this->{attrs}->{name} ) {

Expand Down
2 changes: 2 additions & 0 deletions WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm
Expand Up @@ -1276,6 +1276,8 @@ EVERYWHERE
name => 'Item14253LinkSpaces',
tml => <<"HERE",
Text "[[WebHome][This is a link]]" Follows
More "[[WebHome]]" Follows
HERE
},
{
Expand Down

0 comments on commit ec987f2

Please sign in to comment.