Replace newline by linebreak

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

Moderators: Alexander Halser, Tim Green

Post Reply
Rob van Haarst
Posts: 4
Joined: Thu Feb 05, 2015 2:58 pm

Replace newline by linebreak

Unread post by Rob van Haarst »

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?
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Replace newline by linebreak

Unread post by Tim Green »

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.
Post Reply