-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support extensions with multiple parts (i.e. en.md
)
#1123
Conversation
Deploy preview for netlify-cms-www ready! Built with commit e2729eb |
Deploy preview for cms-demo ready! Built with commit e2729eb |
en.md
)en.md
)
bbb512c
to
f6293b0
Compare
@tech4him1 let's do the minimal change to fix #877 now and handle inference in a new issue/PR. I'm cloning this to test now. |
I agree with @Benaiah to get this moving forward, since it is a working incremental |
en.md
)en.md
)
There seems to be a bug when using the GitHub backend -- if you use Affecting code: |
en.md
)en.md
)
@tech4him1 I tested this locally and it works great 🍻 I do think one bit of sanitization is in order, though - when trying this, I assumed the extension should include a dot, so I set Once that's fixed, LGTM. |
Also validated this myself, including deploying to Netlify itself. Would be great to see this merged. |
@erquhart Updated to clean leading periods from extensions. |
Since we are building the regex with `new RegExp`, the escapes must be double-escaped. Instead of `\.` to esape the period, we need `\\.`. Because that was not done, we were simply checking for *any* character, instead of a literal period.
- Summary
Fixes #877. See discussion there for context.
- Test plan
Manually tested. Is it worth mocking the API for
listFiles
to test this?- Description for the changelog
Support extensions with multiple parts (i.e.
en.md
).Clean leading periods from extensions.
- A picture of a cute animal (not mandatory but encouraged)