[MKDoc-commit] [1.6] trim any existing extensions from components uri_name and

bruno at mkdoc.demon.co.uk bruno at mkdoc.demon.co.uk
Fri Aug 26 15:39:53 BST 2005


Log Message:
-----------
[1.6] trim any existing extensions from components uri_name and regenerate all
components uri_name when using add_component()

Tags:
----
mkdoc-1-6

Modified Files:
--------------
    mkd/flo/editor/Mixin:
        normalize_name.pm
    mkd/flo:
        Editor.pm

-------------- next part --------------
Index: normalize_name.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/editor/Mixin/normalize_name.pm,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -Lflo/editor/Mixin/normalize_name.pm -Lflo/editor/Mixin/normalize_name.pm -u -r1.2.2.3 -r1.2.2.4
--- flo/editor/Mixin/normalize_name.pm
+++ flo/editor/Mixin/normalize_name.pm
@@ -47,6 +47,7 @@
     my $class = shift;
     my $name  = shift;
     $name = lc ($name);
+    $name =~ s/\..*//g;
     $name =~ s/[^a-z0-9-]/ /g;
     $name =~ s/\s+/-/g;
     $name =~ s/\-+/-/g;
Index: Editor.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/Editor.pm,v
retrieving revision 1.12.2.46
retrieving revision 1.12.2.47
diff -Lflo/Editor.pm -Lflo/Editor.pm -u -r1.12.2.46 -r1.12.2.47
--- flo/Editor.pm
+++ flo/Editor.pm
@@ -643,6 +643,7 @@
     $component->{parent_id}    = $parent->id();
     $component->{position}     = $next_id;
     $self->{block}->{$next_id} = $component;
+    $self->_initialize_uri_names();
 }
 
 


More information about the MKDoc-commit mailing list