Skip to content

Commit

Permalink
fix: escape curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-psi committed Jun 19, 2022
1 parent e914f21 commit 4a7dfec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/templates/resources/rust/src/helper.rs.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ pub fn text_with_newlines(node: Node) -> String {
Node::new_fragment(
node.html()
.read()
.replace("<br>", "{{ .LINEBREAK }}")
.replace("<br>", "{{ "{{ .LINEBREAK }}" }}")
.as_bytes(),
)
.text()
.read()
.replace("{{ .LINEBREAK }}", "\n")
.replace("{{ "{{ .LINEBREAK }}" }}", "\n")
} else {
String::new()
}
Expand Down

0 comments on commit 4a7dfec

Please sign in to comment.