So if you go to My documentation page , go down to point 8 and try and copy the Systemd unit file from the browser to an editor, the line returns are not preserved and instead spaces are substituted. If I copy the text from a chrome browser into an editor, the new lines are preserved. I've copied the HTML source code below.
So the code is rendering correctly in the browser, but is being incorrectly copied by Firefox. Note if you copy the above from this forum across to an editor the new lines are preserved, but if you copy it from the website they are not.
So if you go to [https://richstrat.com/Documentation/tomcat.html My documentation page] , go down to point 8 and try and copy the Systemd unit file from the browser to an editor, the line returns are not preserved and instead spaces are substituted. If I copy the text from a chrome browser into an editor, the new lines are preserved. I've copied the HTML source code below.
<code>
<span style='display: block; color: lightgreen;'>[Unit]</span>
<span style='display: block;'>Description=Apache Tomcat 11.0 Web Application Container</span>
<span style='display: block;'>After=network.target</span>
<span style='display: block;'><br></span>
<span style='display: block; color: lightgreen;'>[Service]</span>
<span style='display: block;'>Type=forking</span>
<span style='display: block;'><br></span>
<span style='display: block;'>Environment="JAVA_HOME=/usr/lib/jvm/java-1.25.0-openjdk-amd64"</span>
<span style='display: block;'>Environment="CATALINA_PID=/opt/tomcat/Base/temp/tomcat.pid"</span>
<span style='display: block;'>Environment="CATALINA_HOME=/opt/tomcat/tom11/"</span>
<span style='display: block;'>Environment="CATALINA_BASE=/opt/tomcat/Base/"</span>
<span style='display: block;' id='nRam0'>Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"</span>
<span style='display: block;'>Environment="JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom"</span>
<span style='display: block;'>ExecStart=/opt/tomcat/tom11/bin/startup.sh</span>
<span style='display: block;'>ExecStop=/opt/tomcat/tom11/bin/shutdown.sh</span>
<span style='display: block;' id='uName17'>User=tommy</span>
<span style='display: block;' id='uName18'>Group=tommy</span>
<span style='display: block;'>UMask=0007</span>
<span style='display: block;'>RestartSec=10</span>
<span style='display: block;'>Restart=always</span>
<span style='display: block; color: lightgreen;'>[Install]</span>
<span style='display: block;'>WantedBy=multi-user.target</span>
</code>
So the code is rendering correctly in the browser, but is being incorrectly copied by Firefox. Note if you copy the above from this forum across to an editor the new lines are preserved, but if you copy it from the website they are not.
So just to add the copy from browser to editor works correctly in both Chrome and Brave. It works incorrectly from a Firefox browser on both Windows and various Linux distros.
So just to add the copy from browser to editor works correctly in both Chrome and Brave. It works incorrectly from a Firefox browser on both Windows and various Linux distros.