remove detect_enoding. detect_encoding means force_encoding to the file.data's encoding, not encoding to utf8. will cause encoding problem.
This commit is contained in:
parent
c71a76e71a
commit
202807c21a
2 changed files with 3 additions and 3 deletions
|
@ -42,9 +42,9 @@
|
||||||
.readme
|
.readme
|
||||||
- if content.name =~ /\.(md|markdown)$/i
|
- if content.name =~ /\.(md|markdown)$/i
|
||||||
= preserve do
|
= preserve do
|
||||||
= markdown(content.data.detect_encoding!)
|
= markdown(content.data)
|
||||||
- else
|
- else
|
||||||
= simple_format(content.data.detect_encoding!)
|
= simple_format(content.data)
|
||||||
|
|
||||||
- if params[:path]
|
- if params[:path]
|
||||||
- history_path = tree_file_project_ref_path(@project, @ref, params[:path])
|
- history_path = tree_file_project_ref_path(@project, @ref, params[:path])
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#tree-readme-holder
|
#tree-readme-holder
|
||||||
.readme
|
.readme
|
||||||
= preserve do
|
= preserve do
|
||||||
= markdown(file.data.detect_encoding!)
|
= markdown(file.data)
|
||||||
- else
|
- else
|
||||||
.view_file_content
|
.view_file_content
|
||||||
- unless file.empty?
|
- unless file.empty?
|
||||||
|
|
Loading…
Reference in a new issue