Skip to content

Commit b9ee02d

Browse files
authored
Merge pull request #1162 from fehiepsi/master
Update code_prettify.yaml
2 parents e620b12 + 8646d5a commit b9ee02d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jupyter_contrib_nbextensions/nbextensions/code_prettify/code_prettify.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Parameters:
5656
{
5757
"python": {
5858
"library": "import json\ndef yapf_reformat(cell_text):\n import yapf.yapflib.yapf_api\n import re\n cell_text = re.sub('^%', '#%#', cell_text, flags=re.M)\n reformated_text = yapf.yapflib.yapf_api.FormatCode(cell_text)[0]\n return re.sub('^#%#', '%', reformated_text, flags=re.M)",
59-
"prefix": "print(json.dumps(yapf.yapflib.yapf_api.FormatCode(u",
60-
"postfix": ")[0]))"
59+
"prefix": "print(json.dumps(yapf_reformat(u",
60+
"postfix": ")))"
6161
},
6262
"r": {
6363
"library": "library(formatR)\nlibrary(jsonlite)",

0 commit comments

Comments
 (0)