Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update src/erlydtl_runtime.erl #57

Merged
merged 1 commit into from

2 participants

@sendtopms

Fixed issue #56
spaceless is not removing newline.

@sendtopms sendtopms Update src/erlydtl_runtime.erl
Fixed issue #56	
spaceless is not removing newline.
3d6d681
@evanmiller
Owner

Would you mind updating the tests to prove your change works and prevent future regressions? Around here should do:

https://github.com/evanmiller/erlydtl/blob/master/tests/src/erlydtl_unittests.erl#L1001

Thanks!

@evanmiller evanmiller merged commit 194e844 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 28, 2012
  1. @sendtopms

    Update src/erlydtl_runtime.erl

    sendtopms authored
    Fixed issue #56	
    spaceless is not removing newline.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/erlydtl_runtime.erl
View
6 src/erlydtl_runtime.erl
@@ -269,9 +269,9 @@ widthratio(Numerator, Denominator, Scale) ->
spaceless(Contents) ->
Contents1 = lists:flatten(Contents),
- Contents2 = re:replace(Contents1, "^\s+<", "<", [{return,list}]),
- Contents3 = re:replace(Contents2, ">\s+$", ">", [{return,list}]),
- Contents4 = re:replace(Contents3, ">\s+<", "><", [global, {return,list}]),
+ Contents2 = re:replace(Contents1, "^\\s+<", "<", [{return,list}]),
+ Contents3 = re:replace(Contents2, ">\\s+$", ">", [{return,list}]),
+ Contents4 = re:replace(Contents3, ">\\s+<", "><", [global, {return,list}]),
Contents4.
read_file(Module, Function, DocRoot, FileName) ->
Something went wrong with that request. Please try again.