Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

partials/layouts collections discard dot namespaces in view keys #948

Open
@mootari

Description

@mootari

version

0.24.3

description

  1. Given are two templates that use dots in their filenames to emulate namespaces:
    • list.hbs
    • list.item.hbs
  2. Templates are added to the defaultpartials orlayouts collections using a glob string.
  3. When each view reaches the defaultrenameKey callback,view.key is already sanitized to only contain the template basename.
  4. When therenameKey callback gets invoked andview.key still contains ".", any remainder after (and including) the dot will be discarded.
  5. When the view for the template containing the extended name gets added to the collection it silently overwrites the previous view.

Source:

assemble/index.js

Lines 140 to 142 ind385ca8

renameKey:function(fp){
returnpath.basename(fp,path.extname(fp));
}

Suggested solution

Warn or error out if adding a view onto a collection replaces an already existing view. Optionally suggest a customrenameKey callback.
This will also help with situations where users have identical basenames or identical filenames in different directories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp