From 60dccf3bb359057b3f3ae3221d519c0ee6db61d4 Mon Sep 17 00:00:00 2001 From: Philip Scherer Date: Sat, 21 May 2022 22:14:22 +0200 Subject: [PATCH] Fix indentation in multiline strings --- src/station.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/station.rs b/src/station.rs index 84b0545..38a23b7 100644 --- a/src/station.rs +++ b/src/station.rs @@ -88,13 +88,13 @@ pub mod station { fn init_crypto(&mut self, response: &str) -> Result<(), StationError> { let re = Regex::new( - r"(?x) # Ignore whitespace; allow line comments - (\W|^) [[:space:]]* # Start of Javascript statement - var [[:space:]]+ (?P[[:word:]]+) # variable declaration - [[:space:]]* = [[:space:]]* # Equals sign - '(?P[^']*)' # String value - [[:space:]]*; # End of statement - ", + r"(?x) # Ignore whitespace; allow line comments + (\W|^) [[:space:]]* # Start of Javascript statement + var [[:space:]]+ (?P[[:word:]]+) # variable declaration + [[:space:]]* = [[:space:]]* # Equals sign + '(?P[^']*)' # String value + [[:space:]]*; # End of statement + ", ) .unwrap(); @@ -137,9 +137,9 @@ pub mod station { .init_crypto( format!( r"var currentSessionId = '{}'; - var myIv = '{}'; - var mySalt = '{}'; - ", + var myIv = '{}'; + var mySalt = '{}'; + ", &session_id, &iv, &salt ) .as_str(),