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

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

Copy not preserving block new lines

  • Нет ответов
  • 0 имеют эту проблему
more options

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.

Изменено rr11

Для ответа на сообщения вы должны войти в свою учётную запись. Пожалуйста, задайте новый вопрос, если у вас ещё нет учётной записи.