Skip to content
Snippets Groups Projects
  • Guy Jacob's avatar
    8e14ef0b
    Bugfix in normalize_module_name · 8e14ef0b
    Guy Jacob authored
    Previous code looked for the patterns 'module.' and '.module' separately
    and removed the first instance.
    Issues with this:
    * Too broad. If a user gives some module a name that has the prefix or
      suffix 'module', that pre/suffix would be removed.
    * Doesn't catch the corner case of the "root" module in a model
    
    Modified to split name by the module separator '.', and then remove the
    first instance of the name 'module'
    8e14ef0b
    History
    Bugfix in normalize_module_name
    Guy Jacob authored
    Previous code looked for the patterns 'module.' and '.module' separately
    and removed the first instance.
    Issues with this:
    * Too broad. If a user gives some module a name that has the prefix or
      suffix 'module', that pre/suffix would be removed.
    * Doesn't catch the corner case of the "root" module in a model
    
    Modified to split name by the module separator '.', and then remove the
    first instance of the name 'module'