Skip to content

Commit ca03ad7

Browse files
committed
feat: conditionally render markdown content based on plugin settings
1 parent 03a6aa5 commit ca03ad7

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/abstract-wp-client.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,14 @@ export abstract class AbstractWordPressClient implements WordPressClient {
135135
auth,
136136
postParams
137137
});
138-
const html = AppState.markdownParser.render(postParams.content);
138+
139+
let content = postParams.content;
140+
if (!this.plugin.settings.uploadRawMarkdown) {
141+
content = AppState.markdownParser.render(postParams.content);
142+
}
139143
const result = await this.publish(
140144
postParams.title ?? 'A post from Obsidian!',
141-
html,
145+
content,
142146
postParams,
143147
auth);
144148
if (result.code === WordPressClientReturnCode.Error) {

0 commit comments

Comments
 (0)