Merge pull request #632 from bhollis/tilde
Fix handling directories with ~ in them.
This commit is contained in:
commit
e5713f74d5
14
middleman-core/features/tilde_directories.feature
Normal file
14
middleman-core/features/tilde_directories.feature
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
@encoding
|
||||||
|
|
||||||
|
Feature: Tilde directories
|
||||||
|
In order to support ~ characters in directories
|
||||||
|
|
||||||
|
Scenario: Build directories with containing ~ characters in their name
|
||||||
|
Given a fixture app "empty-app"
|
||||||
|
And a file named "source/~notexistinguser/index.html" with:
|
||||||
|
"""
|
||||||
|
It works!
|
||||||
|
"""
|
||||||
|
And the Server is running
|
||||||
|
When I go to "/~notexistinguser/index.html"
|
||||||
|
Then I should see "It works!"
|
|
@ -127,8 +127,7 @@ module Middleman::CoreExtensions
|
||||||
# @param [String] path
|
# @param [String] path
|
||||||
# @return [Array<Thor::CoreExt::HashWithIndifferentAccess, String>]
|
# @return [Array<Thor::CoreExt::HashWithIndifferentAccess, String>]
|
||||||
def frontmatter_and_content(path)
|
def frontmatter_and_content(path)
|
||||||
full_path = File.expand_path(path, @app.source_dir)
|
full_path = File.expand_path(File.join(@app.source_dir, path))
|
||||||
|
|
||||||
content = File.read(full_path)
|
content = File.read(full_path)
|
||||||
data = {}
|
data = {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue