diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-19 15:51:41 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-19 15:51:41 -0600 |
commit | 6e218d9e5648264756b33a4b66aea1f44e8f1c2a (patch) | |
tree | 247c79aad9c8e8fdfd255ccc61249686ac813e36 | |
parent | 5c60f230cba68b46a93a6316a265838bd62f7c0f (diff) |
do not strip newlines between chunks without bangtag tokens
-rw-r--r-- | app/lib/bangtags.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb index 900ba9e1c..af9649662 100644 --- a/app/lib/bangtags.rb +++ b/app/lib/bangtags.rb @@ -106,7 +106,10 @@ class Bangtags next end - next unless chunk.starts_with?('#!') + unless chunk.starts_with?('#!') + @chunks << chunk + next + end orig_chunk = chunk chunk.sub!(/(\\:)?+:+?!#\Z/, '\1') |