@jobloo/shared 1.0.7 → 1.0.8
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.
|
@@ -22,7 +22,7 @@ export declare function getBestDescription(job: {
|
|
|
22
22
|
}): string;
|
|
23
23
|
/**
|
|
24
24
|
* Get raw HTML description for rich rendering
|
|
25
|
-
*
|
|
25
|
+
* Decodes HTML entities so <p> becomes <p> for proper rendering
|
|
26
26
|
*/
|
|
27
27
|
export declare function getRawDescription(job: {
|
|
28
28
|
source?: string;
|
|
@@ -137,18 +137,25 @@ export function getBestDescription(job) {
|
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
139
|
* Get raw HTML description for rich rendering
|
|
140
|
-
*
|
|
140
|
+
* Decodes HTML entities so <p> becomes <p> for proper rendering
|
|
141
141
|
*/
|
|
142
142
|
export function getRawDescription(job) {
|
|
143
|
+
let rawHtml = '';
|
|
143
144
|
// For LEVER: Combine opening + description_body
|
|
144
145
|
if (job.source === 'lever') {
|
|
145
146
|
const opening = job.opening || '';
|
|
146
147
|
const body = job.descriptionBody || '';
|
|
147
148
|
if (opening && body) {
|
|
148
|
-
|
|
149
|
+
rawHtml = opening + '<br/><br/>' + body;
|
|
149
150
|
}
|
|
150
|
-
|
|
151
|
+
else {
|
|
152
|
+
rawHtml = body || opening || '';
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
// For other sources: Use description field
|
|
157
|
+
rawHtml = job.description || job.descriptionBody || job.opening || '';
|
|
151
158
|
}
|
|
152
|
-
//
|
|
153
|
-
return
|
|
159
|
+
// Decode HTML entities so <p> becomes <p> for rendering
|
|
160
|
+
return decodeHTMLEntities(rawHtml);
|
|
154
161
|
}
|