Skip to content

Commit 8fcb4dd

Browse files
committed
initial octave support (#121)
1 parent 280af1b commit 8fcb4dd

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ Some languages has the one-liners-cheat sheet, `1line`:
698698

699699
![cheat.sh usage](http://cheat.sh/files/supported-languages-c++.png)
700700

701-
At the moment, cheat.sh covers the 55 following programming languages (alphabetically sorted):
701+
At the moment, cheat.sh covers the 57 following programming languages (alphabetically sorted):
702702

703703
|Prefix |Language |Basics|One-liners|Weirdness|StackOverflow|
704704
|-----------|----------|------|----------|---------|-------------|
@@ -739,6 +739,7 @@ At the moment, cheat.sh covers the 55 following programming languages (alphabeti
739739
|`lua/` |Lua || | ||
740740
|`matlab/` |MATLAB || | ||
741741
|`ocaml/` |OCaml || | ||
742+
|`octave/` |Octave || | ||
742743
|`perl/` |Perl ||| ||
743744
|`perl6/` |Perl 6 ||| ||
744745
|`php/` |PHP || | ||

lib/adapter/learnxiny.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,12 @@ class LearnMatlabAdapter(LearnXYAdapter):
552552
_filename = "matlab.html.markdown"
553553
_splitted = False
554554

555+
class LearnOctaveAdapter(LearnXYAdapter):
556+
"Learn Octave in Y Minutes"
557+
prefix = "octave"
558+
_filename = "matlab.html.markdown"
559+
_splitted = False
560+
555561
class LearnKotlinAdapter(LearnXYAdapter):
556562
"""
557563
Learn Kotlin in Y Minutes

lib/adapter/rosetta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,5 @@ def is_found(self, _):
132132
return False
133133

134134
def __init__(self):
135-
Adapter.__init__()
135+
Adapter.__init__(self)
136136
self._rosetta_code_name = self._load_rosetta_code_names()

lib/languages_data.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"mongo" : pygments.lexers.JavascriptLexer,
4646
"objective-c": pygments.lexers.ObjectiveCppLexer,
4747
"ocaml" : pygments.lexers.OcamlLexer,
48+
"octave" : pygments.lexers.OctaveLexer,
4849
"perl" : pygments.lexers.PerlLexer,
4950
"perl6" : pygments.lexers.Perl6Lexer,
5051
"php" : pygments.lexers.PhpLexer,
@@ -95,6 +96,7 @@
9596
'wolfram' : 'mathematica',
9697
'mma' : 'mathematica',
9798
'wolfram-mathematica': 'mathematica',
99+
'm' : 'octave',
98100
}
99101

100102
VIM_NAME = {
@@ -203,6 +205,7 @@
203205
VIM_FT_NAME = {
204206
'asm': 'assembler',
205207
'javascript': 'js',
208+
'octave': 'matlab',
206209
}
207210

208211
VSCODE_FT_NAME = {

0 commit comments

Comments
 (0)