Windows 10 reached EOS (end of support) on October 14, 2025. For more information, see this article.

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Ďalšie informácie

Copy not preserving block new lines

  • 1 odpoveď
  • 0 má tento problém
  • 24 zobrazení
  • Posledná odpoveď od rr11

ďalšie možnosti

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.

       [Unit]
       Description=Apache Tomcat 11.0 Web Application Container
       After=network.target
       
[Service] Type=forking
Environment="JAVA_HOME=/usr/lib/jvm/java-1.25.0-openjdk-amd64" Environment="CATALINA_PID=/opt/tomcat/Base/temp/tomcat.pid" Environment="CATALINA_HOME=/opt/tomcat/tom11/" Environment="CATALINA_BASE=/opt/tomcat/Base/" Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC" Environment="JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom" ExecStart=/opt/tomcat/tom11/bin/startup.sh ExecStop=/opt/tomcat/tom11/bin/shutdown.sh User=tommy Group=tommy UMask=0007 RestartSec=10 Restart=always [Install] WantedBy=multi-user.target

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.

Upravil(a) rr11 dňa

Všetky odpovede (1)

ďalšie možnosti

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.

Položiť otázku

Ak chcete odpovedať na príspevky, musíte sa prihlásiť do svojho účtu. Ak ešte nemáte účet, položte novú otázku.