[silva.fanstatic][Sylvain Viollon] Add new lines when inserting ...

[email protected]
Newsgroups gmane.comp.web.zope.silva.cvs
Message-ID <[email protected]>
author:    Sylvain Viollon
date:      Tue Jul 23 18:02:28 2013 +0200
revision:  30:4107dc4e74a9 in silva.fanstatic
branch:    
details:   https://hg.infrae.com/silva.fanstatic?cmd=changeset;node=4107dc4e74a9
modified:  src/silva/fanstatic/injector.py
added:     
removed:   
log:       Add new lines when inserting things.


diffstat:

 src/silva/fanstatic/injector.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r f58a23b4ea05 -r 4107dc4e74a9 src/silva/fanstatic/injector.py
--- a/src/silva/fanstatic/injector.py	Tue Jul 23 17:49:13 2013 +0200
+++ b/src/silva/fanstatic/injector.py	Tue Jul 23 18:02:28 2013 +0200
@@ -72,7 +72,7 @@
             tag = self.tag
         return html.replace(
             compat.as_bytestring(tag),
-            compat.as_bytestring(resources + tag))
+            compat.as_bytestring(resources + '\n'+ tag))
 
 
 class InjectAfterAction(Action):
@@ -89,7 +89,7 @@
             tag = self.tag
         return html.replace(
             compat.as_bytestring(tag),
-            compat.as_bytestring(tag + resources))
+            compat.as_bytestring(tag + '\n'+ resources))
 
 ACTIONS = [ReplaceAction, InjectBeforeAction, InjectAfterAction]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.