Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
92361c93
Commit
92361c93
authored
Jan 06, 2014
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing code mirror mode to ignore :! things
parent
7f23e743
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
build.sh
build.sh
+4
-3
custom.js
profile/static/custom/custom.js
+16
-2
No files found.
build.sh
View file @
92361c93
...
...
@@ -4,6 +4,10 @@ rm -f profile.tar
tar
-cvf
profile.tar
*
cd
..
cabal
install
--force-reinstalls
||
exit
1
# Remove my profile
rm
-rf
~/.ipython/profile_haskell
cd
ihaskell-display
for
dir
in
`
ls
`
do
...
...
@@ -11,6 +15,3 @@ do
cabal
install
||
exit
1
cd
..
done
# Remove my profile
rm
-rf
~/.ipython/profile_haskell
profile/static/custom/custom.js
View file @
92361c93
...
...
@@ -15,8 +15,22 @@ $([IPython.events]).on('app_initialized.NotebookApp', function(){
// add here logic that shoudl be run once per **page load**
// like adding specific UI, or changing the default value
// of codecell highlight.
CodeMirror
.
requireMode
(
'haskell'
,
function
(){
// Create a multiplexing mode that uses Haskell highlighting by default but
// doesn't highlight command-line directives.
CodeMirror
.
defineMode
(
"ihaskell"
,
function
(
config
)
{
return
CodeMirror
.
multiplexingMode
(
CodeMirror
.
getMode
(
config
,
"haskell"
),
{
open
:
/:
(?=
!
)
/
,
// Matches : followed by !, but doesn't consume !
close
:
/^
(?!
!
)
/
,
// Matches start of line not followed by !, doesn't consume character
mode
:
CodeMirror
.
getMode
(
config
,
"text/plain"
),
delimStyle
:
"delimit"
}
);
});
cells
=
IPython
.
notebook
.
get_cells
();
for
(
var
i
in
cells
){
c
=
cells
[
i
];
...
...
@@ -24,7 +38,7 @@ $([IPython.events]).on('app_initialized.NotebookApp', function(){
// Force the mode to be Haskell
// This is necessary, otherwise sometimes highlighting just doesn't happen.
// This may be an IPython bug.
c
.
code_mirror
.
setOption
(
'mode'
,
'haskell'
);
c
.
code_mirror
.
setOption
(
'mode'
,
'
i
haskell'
);
c
.
auto_highlight
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment