atom-community / atom-community/atom-script

Running Python files and printing any type()

Open
#2,498 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

If you try to run a Python file with:
print( type( 'abc' ) )
you will get an empty output. I realised this is because Atom is treating the correct output of as an HTML tag.

The way to fix this is to escape the opening angle bracket by editing lib/script-view.js and change line 204 from:

this.pre({ class: `line ${css}` }, () => this.raw(line))

to:

this.pre({ class: `line ${css}` }, () => this.raw(line.replace(/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.