Skip to content

No output without print and no line breaks #25

@HugoMVale

Description

@HugoMVale

Describe the bug
First of all, thanks for this very nice plugin. There are two issues, probably related:

  1. Output is only generated with print, not by calling the variable/object.

    This will produce nothing:
    '''python exec="on" source="material-block"
    x=1
    x
    '''

    This will work:
    '''python exec="on" source="material-block"
    x=1
    print(x)
    '''
    1

  2. Line breaks are not respected.

    This will print the two numbers next to each other, rather than below each other.
    '''python exec="on" source="material-block"
    x=1
    y=1
    print(x)
    print(y)
    '''
    1 2

Expected behavior
I would expect the output to be as in the console, so that the code examples are representative of real use.

System (please complete the following information):

  • Markdown Exec version: 1.6.0
  • Python version: e.g. 3.10
  • OS: Windows

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions