Replace newline by linebreak

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Replace newline by linebreak

Unread postby Rob van Haarst » Wed Feb 06, 2019 11:26 am

We author code snippets in H&M 7 in the standard Code Example style, with normal newlines created by pressing ENTER.
They look good when published as WebHelp (or indeed .CHM), but once you cut-and-paste the published version to some editor, eg. Notepad++, you get DOUBLE newlines (or line feeds, or carriage returns, or whatever they should be called, the terminological confusion is unbelievable here).
We have discovered we can solve this (while authoring in H&M 7) by pressing SHIFT+ENTER instead of ENTER. I believe the thing you get by pressing SHIFT+ENTER is called a line break. (We have also noticed the special icon for linebreaks that you get to see if you switch "Show paragraphs and text marks" to On).
Our problem is that producing linebreaks instead of newlines is really hard work, especially because all the line breaks flip back to newlines each time you cut-and-paste to a coding environment for live testing, and then cut-and-paste back to the H&M topic.
Question: Is there a way in H&M to find-and-replace all the newlines in a code block by line breaks?
Rob van Haarst
 
Posts: 4
Joined: Thu Feb 05, 2015 2:58 pm

Re: Replace newline by linebreak

Unread postby Tim Green » Wed Feb 06, 2019 11:51 am

Question: Is there a way in H&M to find-and-replace all the newlines in a code block by line breaks?

This is automatic if you use the syntax highlighter in the current version of Help+Manual. Just select the code text and apply the syntax highlighter and all the included carriage returns will be replace with line breaks, in addition to the syntax formatting applied.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 20618
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 8 guests