I'm using RH 2019 (reimagined), update 14, and there are extra spaces sometimes appearing before condition tags that seem impossible to remove.
For example, in Author view, note the extra space between InformaCast and Mobile in the following sentence:
You will be redirected to a page where you will have to enter your password unless you are already logged into your account, in which case you will be immediately logged into InformaCast Mobile Fusion.
The Source view looks like the following:
You will be redirected to a page where you will have to enter your password unless you are already logged into your account, in which case you will be immediately logged into InformaCast <span data-condition="Others:Mobile"> Mobile</span><span data-condition="Others:Fusion"> Fusion</span>.
You can see that there are two spaces (one after InformaCast and one before Mobile).
However, when I remove that space either in Author or Source view, save it, and then view it in Preview view, it comes back. There's seemingly no way to get rid of it. However, it does not seem to be present in the actual published content (I'm using HTML5 output).
Elsewhere on that page, the same tags are used with no ill effects (Author view):
You will be redirected to the gateway, which will return you to InformaCast Mobile Fusion once you’ve been authenticated.
And in Source view:
You will be redirected to the gateway, which will return you to InformaCast<span data-condition="Others:Mobile"> Mobile</span>
data-condition="Others:Fusion"> Fusion</span> once you’ve been authenticated.
How do I fix this?
Using that code I get this.
There is only one space between InformaCast and Mobile. From the code I would expect to see two as there is a space before and after the span tag but RoboHelp seems to take care of that.
If I then remove one of those spaces it still looks correct and the removal sticks after going to preview.
That has not been my experience (that it sticks) and I've also tried removing spaces in the code so that both <span> tags are right next to each other. I make changes, save, look at it from another view and they're back.
Create a new project and copy that code in. The default tags are Online and Print, change that in the code.
Does it work there?
... or try it in one of the sample projects.
Yes, it does work in a new project.
I think it is a bit of trial and error now.
First import the working topic into your original project and see if it still works.
If it does, then copy from the original the text to a few words before the problem and paste into the imported topic. Do the same with text after. Then manually finish the remaining words.
Assuming that all works, delete the original topic. Otherwise tell us how far you got.
OK. I tried two things:
Can you share the project? If you can, then see the Contact page on my site and send the project as instructed there. Do make sure you include a link to this thread and please do not email the project direct.
When sending, make sure you let me know which topic has the problem.
This is what you had in the topic. The space after InformaCast was included in the Mobile tagging.
Note in source view there is no space between InformaCast and the span tag but there is one before Mobile within the tag.
I changed that in source view so that there is a space after InformaCast and the span tag and no space between the end of the tag and Mobile. In author mode it looks like this and seems to work.
Are you saying those changes do not work for you?
Peter, could you include what the Source view looks like with your changes?
I can do that later but the only change is there is a space where you see the cursor and no space in front of Mobile.
Oh, I see what you've done now.
The tags in the sentence that start with "If you have more than one provider..." do work how I intended (this problem doesn't affect all instances of the Mobile condition tag, just some).
I've been trying to have the Mobile and Fusion instances include the space before them within the tag because I sometimes just copy and paste these all through a topic and when they fall at the end of a sentence, there isn't somehow an extra space before the period.
The following picture shows the Source view from a condition tag that's working and you can see the space highlighted in blue:
If, using the Okta code you also cited, I remove the space included with the tag and Mobile and put it instead after InformaCast (and not within the tag), save it, change views, it does work, which doesn't make any sense because then there should be an extra space between InformaCast and Fusion when that output is selected because the Fusion tag does have the space within it and is working as intended. Here's that code with the spacing highlighted in blue in two spots:
Here's the output for Mobile:
Here's the output for Fusion:
There's no double space between InformaCast and Fusion, yet the code clearly shows a space after InformaCast (not included in a tag) and a space in the tag with Fusion.
Avoid spaces at the beginning or end of a tag?
I don't want to say that's impossible, but it would be difficult. These are our products' names, they appear frequently in over 900 topics, and spaces have always been included before without this wonkiness. Indeed, in that same topic, they appear just fine with spaces in other places. It's just odd.