Skip to content

Commit 4787735

Browse files
committed
[protobuf mode] Integrate
Issue codemirror#3862
1 parent 72d4770 commit 4787735

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

doc/compress.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ <h2>Script compression helper</h2>
181181
<option value="http://codemirror.net/mode/php/php.js">php.js</option>
182182
<option value="http://codemirror.net/mode/pig/pig.js">pig.js</option>
183183
<option value="http://codemirror.net/mode/properties/properties.js">properties.js</option>
184+
<option value="http://codemirror.net/mode/protobuf/protobuf.js">protobuf.js</option>
184185
<option value="http://codemirror.net/mode/python/python.js">python.js</option>
185186
<option value="http://codemirror.net/mode/puppet/puppet.js">puppet.js</option>
186187
<option value="http://codemirror.net/mode/q/q.js">q.js</option>

mode/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ <h2>Language modes</h2>
104104
<li><a href="php/index.html">PHP</a></li>
105105
<li><a href="pig/index.html">Pig Latin</a></li>
106106
<li><a href="properties/index.html">Properties files</a></li>
107+
<li><a href="protobuf/index.html">ProtoBuf</a></li>
107108
<li><a href="puppet/index.html">Puppet</a></li>
108109
<li><a href="python/index.html">Python</a></li>
109110
<li><a href="q/index.html">Q</a></li>

mode/meta.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
{name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
104104
{name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]},
105105
{name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},
106+
{name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]},
106107
{name: "Python", mime: "text/x-python", mode: "python", ext: ["py", "pyw"]},
107108
{name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},
108109
{name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},

mode/protobuf/protobuf.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@
6161
};
6262

6363
CodeMirror.defineMode("protobuf", function() {
64-
return {
65-
token: function(stream) {
66-
return tokenBase(stream);
67-
}
68-
};
64+
return {token: tokenBase};
6965
});
7066

7167
CodeMirror.defineMIME("text/x-protobuf", "protobuf");

0 commit comments

Comments
 (0)