Skip to content

Modify regex #1236

Open
Open
@AInitikesh

Description

@AInitikesh

ollama:deepseek-coder-v2
Generates code like bellow

 ```python
def add(a, b):
    if b == 0:
        return float('inf')  # Using infinity to avoid division by zero
    else:
        return a / b
add(1,0)

where there is space before ```python causing the output to be incorrect. Need to modify the lang_indicator as follows.

lang_indicator = r"^\s*```[a-zA-Z0-9]\s\n"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs reported by usersgood first issueGood for newcomersscope:magicsIssues concerning the magic commands

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions