-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from krassowski/configurable-competer
Add completion settings (Hinterland mode, documentation, suppression)
- Loading branch information
Showing
207 changed files
with
8,229 additions
and
3,589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
*** Settings *** | ||
Suite Setup Setup Suite For Screenshots syntax_highlighting | ||
Test Setup Setup Highlighting Test | ||
Test Teardown Clean Up After Working With File Syntax highlighting.ipynb | ||
Force Tags feature:syntax_highlighting | ||
Resource ../Keywords.robot | ||
|
||
*** Test Cases *** | ||
Syntax Highlighting Mode Stays Normal In Normal Cells | ||
${mode} = Get Mode Of A Cell 1 | ||
should be equal ${mode['name']} ipython | ||
|
||
Syntax Highlighting Mode Changes In Cells Dominated By Foreign Documents | ||
${mode} = Get Mode Of A Cell 2 | ||
should be equal ${mode['name']} markdown | ||
${mode} = Get Mode Of A Cell 3 | ||
should be equal ${mode['name']} xml | ||
${mode} = Get Mode Of A Cell 4 | ||
should be equal ${mode['name']} javascript | ||
|
||
Highlighing Mode Works For Multiple Documents | ||
${mode} = Get Mode Of A Cell 4 | ||
should be equal ${mode['name']} javascript | ||
${mode} = Get Mode Of A Cell 6 | ||
should be equal ${mode['name']} javascript | ||
|
||
*** Keywords *** | ||
Get Mode Of A Cell | ||
[Arguments] ${cell_nr} | ||
Click Element css:.jp-Cell:nth-child(${cell_nr}) | ||
Wait Until Page Contains Element css:.jp-Cell:nth-child(${cell_nr}) .CodeMirror-focused | ||
${mode} = Execute JavaScript return document.querySelector('.jp-Cell:nth-child(${cell_nr}) .CodeMirror').CodeMirror.getMode() | ||
[Return] ${mode} | ||
|
||
Setup Highlighting Test | ||
Setup Notebook Python Syntax highlighting.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"variable = 1\n", | ||
"\n", | ||
"def function():\n", | ||
" return\n", | ||
"\n", | ||
"# note print is highlighted in Python but function is not\n", | ||
"print(variable, function)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%%markdown\n", | ||
"# header\n", | ||
"**bold**, *italic*\n", | ||
"\n", | ||
"### Heading with wrong level" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%%html\n", | ||
"<html style=\"color: green\">\n", | ||
" <!-- this is a comment -->\n", | ||
" <head>\n", | ||
" <title>HTML Example</title>\n", | ||
" </head>\n", | ||
" <body>\n", | ||
" The indentation tries to be <em>somewhat "do what\n", | ||
" I mean"</em>... but might not match your style.\n", | ||
" </body>\n", | ||
"</html>" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%%javascript\n", | ||
"// \"print\" is NOT highlighted in javascript, while \"function\" is\n", | ||
"function add_together(a, b) {\n", | ||
" return a + b\n", | ||
"}\n", | ||
"\n", | ||
"print('A')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"It should work for the same language of virtual document with multiple occurrences:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%%javascript \n", | ||
"function add_together(a, b) {\n", | ||
" return a + b\n", | ||
"}\n", | ||
"\n", | ||
"print('A')" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.5" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
addition = '' | ||
|
||
|
||
def add(a: int, b: int): | ||
"""Adds a and b together""" | ||
return a, b | ||
|
||
|
||
ad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
There is nothing interesting in here. | ||
It is here just to test how the extension works with files for which there is no associated language support. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.