fix: render markdown in expanded job descriptions (#297)

* fix: render markdown in expanded job descriptions

* fix: respect markdown job description setting and harden rendering
This commit is contained in:
Ammad Ali
2026-03-22 17:01:34 +00:00
committed by GitHub
parent 0b22c08d7d
commit 69a10acd4f
18 changed files with 382 additions and 46 deletions
+12
View File
@@ -57,6 +57,12 @@ describe("settingsRegistry helpers", () => {
expect(settingsRegistry.showSponsorInfo.parse("false")).toBe(false);
expect(settingsRegistry.showSponsorInfo.parse("")).toBeNull();
expect(settingsRegistry.showSponsorInfo.parse(undefined)).toBeNull();
expect(settingsRegistry.renderMarkdownInJobDescriptions.parse("1")).toBe(
true,
);
expect(settingsRegistry.renderMarkdownInJobDescriptions.parse("0")).toBe(
false,
);
});
it("serializes bit bools correctly", () => {
@@ -64,6 +70,12 @@ describe("settingsRegistry helpers", () => {
expect(settingsRegistry.showSponsorInfo.serialize(false)).toBe("0");
expect(settingsRegistry.showSponsorInfo.serialize(null)).toBeNull();
expect(settingsRegistry.showSponsorInfo.serialize(undefined)).toBeNull();
expect(
settingsRegistry.renderMarkdownInJobDescriptions.serialize(true),
).toBe("1");
expect(
settingsRegistry.renderMarkdownInJobDescriptions.serialize(false),
).toBe("0");
});
});
+7
View File
@@ -371,6 +371,13 @@ export const settingsRegistry = {
parse: parseBitBoolOrNull,
serialize: serializeBitBool,
},
renderMarkdownInJobDescriptions: {
kind: "typed" as const,
schema: z.boolean(),
default: (): boolean => true,
parse: parseBitBoolOrNull,
serialize: serializeBitBool,
},
chatStyleTone: {
kind: "typed" as const,
schema: z.string().trim().max(100),
+5
View File
@@ -186,6 +186,11 @@ export const createAppSettings = (
override: null,
},
showSponsorInfo: { value: true, default: true, override: null },
renderMarkdownInJobDescriptions: {
value: true,
default: true,
override: null,
},
chatStyleTone: {
value: "professional",
default: "professional",
+1
View File
@@ -162,6 +162,7 @@ export interface AppSettings {
jobspyResultsWanted: Resolved<number>;
jobspyCountryIndeed: Resolved<string>;
showSponsorInfo: Resolved<boolean>;
renderMarkdownInJobDescriptions: Resolved<boolean>;
chatStyleTone: Resolved<string>;
chatStyleFormality: Resolved<string>;
chatStyleConstraints: Resolved<string>;