reuseman / flashcards-obsidian

🎴 An Anki plugin for Obsidian.md
MIT License
870 stars 86 forks source link

Code block does not work well when 'code highlight support' setting is turned off #207

Open jjerryyz opened 7 months ago

jjerryyz commented 7 months ago

flashcards version: 1.6.5

Describe the bug Code block does not work well when 'code highlight support' setting is turned off

To Reproduce use the markdown below to reproduce the problem

Expected behavior code block should be work without code highlight support feature

Screenshots no

Markdown used

# Code Block Test 
#card

this is a test cmd

or this
`test`
github-actions[bot] commented 7 months ago

Thank you for taking the time to report the issue and help me to make the project better! 🙂

jjerryyz commented 7 months ago

i catch the anki connect log

[request]
{
    "action": "addNotes",
    "params": {
        "notes": [
            {
                "deckName": "",
                "fields": { ... },
                "modelName": "Obsidian-basic-code",
                "tags": [
                    "obsidian"
                ]
            }
        ]
    },
    "version": 6
}

it seems that addNotes request uses the Obsidian-basic-code model, but the corresponding model were not found in the createModel request