You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just hacked this together for Spyder - shall I make a PR? Is this project still active?
Inside def convert_toplevel_docstring(tokens):
elif token.type == tokenize.COMMENT:
text = token.string
if text.startswith('#%%'):
#print("Spyder cell")
startline, startcol = token.start
# Starting column MUST be 0
if startcol == 0:
endline, endcol = token.end
lines = [line
for line in text.strip('"\' \n').split('\n')]
assert len(lines) == 1
text = '\n'.join(lines)
#text = text[3:]
text = text.replace("#%%", "")
text = text.lstrip()
fmt = '# <markdowncell>\n{0}\n# <codecell>'.format(text)
res = TokenInfo(type=tokenize.COMMENT,
start=(startline, startcol),
end=(endline, endcol),
string=fmt,
line='#')
yield res
# To next token
continue
The text was updated successfully, but these errors were encountered:
Just hacked this together for Spyder - shall I make a PR? Is this project still active?
Inside
def convert_toplevel_docstring(tokens)
:The text was updated successfully, but these errors were encountered: