Skip to content

automatic insertion of pbh.backticks_to_code() is causing problems #84

Description

@firasm

Discovered while debugging the issue resolved by PR #83 (but it doesn't solve this issue).

In terms of flow, I would like pbh.backticks_to_code_tags(data2) to appear before data.update(data2), but because data.update(data2) has been added manually in every question, we probably need to remove data.update(data2) from all questions, and then add it back in algorithmically, at the same time as pbh.backticks_to_code...

So the final form would look something like:

def generate(data):
    
    ...
    
    # The following code is added in by problem bank scripts automatically to
    # convert backticks to codeblocks/code fences in answers text.
    # This line can be commented out to disable
    pbh.backticks_to_code_tags(data)
    # End code added in by problem bank scripts

    # Update the data object with a new dict
    data.update(data2)

def prepare(data):
    pass

This will be messy...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions