Edit File by line
/home/barbar84/www/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/erlang
File: index.html
<!doctype html>
[0] Fix | Delete
[1] Fix | Delete
<title>CodeMirror: Erlang mode</title>
[2] Fix | Delete
<meta charset="utf-8"/>
[3] Fix | Delete
<link rel=stylesheet href="../../doc/docs.css">
[4] Fix | Delete
[5] Fix | Delete
<link rel="stylesheet" href="../../lib/codemirror.css">
[6] Fix | Delete
<link rel="stylesheet" href="../../theme/erlang-dark.css">
[7] Fix | Delete
<script src="../../lib/codemirror.js"></script>
[8] Fix | Delete
<script src="../../addon/edit/matchbrackets.js"></script>
[9] Fix | Delete
<script src="erlang.js"></script>
[10] Fix | Delete
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
[11] Fix | Delete
<div id=nav>
[12] Fix | Delete
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
[13] Fix | Delete
[14] Fix | Delete
<ul>
[15] Fix | Delete
<li><a href="../../index.html">Home</a>
[16] Fix | Delete
<li><a href="../../doc/manual.html">Manual</a>
[17] Fix | Delete
<li><a href="https://github.com/codemirror/codemirror">Code</a>
[18] Fix | Delete
</ul>
[19] Fix | Delete
<ul>
[20] Fix | Delete
<li><a href="../index.html">Language modes</a>
[21] Fix | Delete
<li><a class=active href="#">Erlang</a>
[22] Fix | Delete
</ul>
[23] Fix | Delete
</div>
[24] Fix | Delete
[25] Fix | Delete
<article>
[26] Fix | Delete
<h2>Erlang mode</h2>
[27] Fix | Delete
<form><textarea id="code" name="code">
[28] Fix | Delete
%% -*- mode: erlang; erlang-indent-level: 2 -*-
[29] Fix | Delete
%%% Created : 7 May 2012 by mats cronqvist <masse@klarna.com>
[30] Fix | Delete
[31] Fix | Delete
%% @doc
[32] Fix | Delete
%% Demonstrates how to print a record.
[33] Fix | Delete
%% @end
[34] Fix | Delete
[35] Fix | Delete
-module('ex').
[36] Fix | Delete
-author('mats cronqvist').
[37] Fix | Delete
-export([demo/0,
[38] Fix | Delete
rec_info/1]).
[39] Fix | Delete
[40] Fix | Delete
-record(demo,{a="One",b="Two",c="Three",d="Four"}).
[41] Fix | Delete
[42] Fix | Delete
rec_info(demo) -> record_info(fields,demo).
[43] Fix | Delete
[44] Fix | Delete
demo() -> expand_recs(?MODULE,#demo{a="A",b="BB"}).
[45] Fix | Delete
[46] Fix | Delete
expand_recs(M,List) when is_list(List) ->
[47] Fix | Delete
[expand_recs(M,L)||L<-List];
[48] Fix | Delete
expand_recs(M,Tup) when is_tuple(Tup) ->
[49] Fix | Delete
case tuple_size(Tup) of
[50] Fix | Delete
L when L < 1 -> Tup;
[51] Fix | Delete
L ->
[52] Fix | Delete
try
[53] Fix | Delete
Fields = M:rec_info(element(1,Tup)),
[54] Fix | Delete
L = length(Fields)+1,
[55] Fix | Delete
lists:zip(Fields,expand_recs(M,tl(tuple_to_list(Tup))))
[56] Fix | Delete
catch
[57] Fix | Delete
_:_ -> list_to_tuple(expand_recs(M,tuple_to_list(Tup)))
[58] Fix | Delete
end
[59] Fix | Delete
end;
[60] Fix | Delete
expand_recs(_,Term) ->
[61] Fix | Delete
Term.
[62] Fix | Delete
</textarea></form>
[63] Fix | Delete
[64] Fix | Delete
<script>
[65] Fix | Delete
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
[66] Fix | Delete
lineNumbers: true,
[67] Fix | Delete
matchBrackets: true,
[68] Fix | Delete
extraKeys: {"Tab": "indentAuto"},
[69] Fix | Delete
theme: "erlang-dark"
[70] Fix | Delete
});
[71] Fix | Delete
</script>
[72] Fix | Delete
[73] Fix | Delete
<p><strong>MIME types defined:</strong> <code>text/x-erlang</code>.</p>
[74] Fix | Delete
</article>
[75] Fix | Delete
[76] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function