Skip to content

Commit

Permalink
feat: enable Markdown support by default
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu committed Dec 24, 2024
1 parent e5f2061 commit a0a37da
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { IServiceSettings } from '../../services/SettingsService';
import { getOwner } from '../../lib/User/getOwner';
import supportedOptions from './supportedOptions';
import CardOption from '../../lib/parser/Settings/CardOption';
import { CardOptionDetail } from './CardOptionDetail';

class CardOptionsController {
constructor(private readonly service: IServiceSettings) {}
Expand Down Expand Up @@ -59,7 +60,7 @@ class CardOptionsController {
getDefaultSettingsCardOptions(source: 'client' | 'server') {
if (source === 'client') {
return this.getDefaultOptions()
.map((option: CardOption) => {
.map((option: CardOptionDetail) => {
return { [option.key]: option.value.toString() };
})
.reduce((accumulator, current) => {
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/CardOptionsController/supportedOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const supportedOptions = (): CardOptionDetail[] => {
'markdown-nested-bullet-points',
'Markdown Nested Bullet Points',
'Enable conversion of bullet and sub bullet points in Markdown. If you are a Obsidian user, enable this',
false
true
),
new CardOptionDetail(
'vertex-ai-pdf-questions',
Expand Down
1 change: 1 addition & 0 deletions src/lib/parser/Settings/CardOption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class CardOption {
'perserve-newlines': 'false',
'page-emoji': 'first-emoji',
'image-quiz-html-to-anki': 'false',
'markdown-nested-bullet-points': 'true',
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/parser/Settings/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { CardOption } from './CardOption';
import CardOption from './CardOption';

export default CardOption;
2 changes: 1 addition & 1 deletion src/lib/parser/Settings/loadSettingsFromDatabase.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Knex } from 'knex';

import { getCustomTemplate } from './helpers/getCustomTemplate';
import { CardOption } from './CardOption';
import { sendError } from '../../error/sendError';
import CardOption from './CardOption';

export const loadSettingsFromDatabase = async (
DB: Knex,
Expand Down

0 comments on commit a0a37da

Please sign in to comment.