Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Could a REGEX wizard please help with removing extra carriage returns?

 I have a section at the beginning of my Module for Glossary Terms which I've embedded in a text artifact. However, when published using RPE, all the DIVs and SPANs create a lot of extra carriage returns. Can anyone suggest some JAvaScript/REGEX that could remove these?


Example content below:
<field:valuefield:type="richtext">
<div>
<div>
<div>
<pdir="ltr"id="_1627564729562">
<span> </span>
<spanclass="com-ibm-rdm-editor-EmbeddedResourceDecorator showContent">
<span>
<div>
<pid="_1627555665830">[MY TEXT 1]</p>
</div>
</div>
</span>
</span>
<span>  </span>
</p>
<pdir="ltr"id="_1627564729563">
<span> </span>
<spanclass="com-ibm-rdm-editor-EmbeddedResourceDecorator showContent">
<span>
<div>
<pid="_1627555650276">[MY TEXT 2]</p>
</div>
</div>
</span>
</span>
<span>  </span>
</p>


Produces:
------

  <o:p> </o:p>

[MY TEXT 1] <o:p> </o:p>

   

  <o:p> </o:p>

  <o:p> </o:p>

-------

0 votes


Accepted answer

Permanent link

 Glyn,


Do not modify it in the report. There is easier way.

Could you please check the following:

-go in rm/admin >> Advanced Properties

-look for the settings: publish.removePublishSpaceGenerators

-What is its current value?


-If it is set to false, please set it to true, save the modification.


Bartosz

Glyn Costello selected this answer as the correct answer

0 votes

Comments

Perfect! Spent ages trying to do something myself in REGEX... why isn't this the default? Oh well. 


Thank you! 

1 vote

 Yes, indeed good question why isn't this the default. I lost a bit time to find it too.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,016

Question asked: Sep 17 '21, 12:15 p.m.

Question was seen: 512 times

Last updated: Sep 20 '21, 4:51 a.m.

Confirmation Cancel Confirm