sr-npm 1.7.1255 → 1.7.1257

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/backend/data.js CHANGED
@@ -287,7 +287,7 @@ async function saveJobsDescriptionsAndLocationApplyUrlReferencesToCMS() {
287
287
  const chunkPromises = chunk.map(async job => {
288
288
  try {
289
289
  const jobDetails = await fetchJobDescription(job._id);
290
- const richContentDescription=await htmlRichContentConverter(jobDetails.jobAd.sections,richContentConverterToken);
290
+ const richContentDescription=await htmlRichContentConverter(jobDetails.jobAd.sections,richContentConverterToken,job.name);
291
291
  const jobLocation = fetchJobLocation(jobDetails);
292
292
  const {applyLink , referFriendLink} = fetchApplyAndReferFriendLink(jobDetails);
293
293
  const updatedJob = {
@@ -114,7 +114,7 @@ async function fetchJobDescription(jobId,testObject=undefined) {
114
114
  return await makeSmartRecruitersRequest(`/v1/companies/${companyId}/postings/${jobId}`,templateType);
115
115
  }
116
116
 
117
- async function htmlRichContentConverter(sections,richContentConverterToken) {
117
+ async function htmlRichContentConverter(sections,richContentConverterToken,jobName) {
118
118
 
119
119
  const richContentObject = {}
120
120
  for (const [sectionTitle, sectionData] of Object.entries(sections)) {
@@ -138,7 +138,7 @@ async function htmlRichContentConverter(sections,richContentConverterToken) {
138
138
  if (response.ok) {
139
139
  const data = await response.json();
140
140
  // const richContentWithSpacing=addSpacingToRichContent(sectionData.text,data.richContent.richContent);
141
- const richContentWithSpacing=addEmptyParagraphsBetweenConsecutive(sectionData.text,data.richContent.richContent);
141
+ const richContentWithSpacing=addEmptyParagraphsBetweenConsecutive(sectionData.text,data.richContent.richContent,jobName);
142
142
  richContentObject[sectionTitle] = richContentWithSpacing
143
143
  }
144
144
  else {
@@ -331,7 +331,12 @@ function createEmptyParagraph(id) {
331
331
  }
332
332
 
333
333
  // Adds empty paragraph nodes between consecutive paragraphs and before lists
334
- function addEmptyParagraphsBetweenConsecutive(html, richContent) {
334
+ function addEmptyParagraphsBetweenConsecutive(html, richContent,jobName) {
335
+
336
+ if(jobName===" Apparel Team Member - The Warehouse, Dargaville")
337
+ {
338
+ console.log("rich content is : ",richContent);
339
+ }
335
340
  if (!richContent || !richContent.nodes) return richContent;
336
341
 
337
342
  const hasConsecutiveParagraphs = /<\/p>\s*<p/i.test(html);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.1255",
3
+ "version": "1.7.1257",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {