docs: remove old syntax highlighting (#21955)

* docs: reenabled syntax highlighting
* docs: removed old syntax highlighting
pull/21959/head
Marius van der Wijden 4 years ago committed by GitHub
parent c1f25f83ad
commit 3ffad7ec30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 129
      guide/index.html
  2. 1
      static/scripts/highlight-go.min.js
  3. 1
      static/scripts/highlight-gradle.min.js
  4. 1
      static/scripts/highlight-java.min.js
  5. 1
      static/scripts/highlight-swift.min.js
  6. 3
      static/scripts/highlight.min.js

@ -5,136 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Go Ethereum Guide</title>
<title>Go Ethereum Guide moved</title>
<link rel="icon" type="image/png" href="../static/images/favicon.png" />
<link href="../static/styles/bootstrap.min.css" rel="stylesheet" />
<link href="../static/styles/flatly.min.css" rel="stylesheet" />
<link href="../static/styles/font-awesome.min.css" rel="stylesheet" />
<link href="../static/styles/highlight.min.css" rel="stylesheet" />
<link href="../static/styles/custom/common.css" rel="stylesheet" />
<script src="../static/scripts/jquery.min.js"></script>
<script src="../static/scripts/bootstrap.min.js"></script>
<script src="../static/scripts/moment.min.js"></script>
<script src="../static/scripts/marked.min.js"></script>
<script src="../static/scripts/emojify.min.js"></script>
<script src="../static/scripts/highlight.min.js"></script>
<script src="../static/scripts/highlight-go.min.js"></script>
<script src="../static/scripts/highlight-java.min.js"></script>
<script src="../static/scripts/highlight-gradle.min.js"></script>
<script src="../static/scripts/highlight-swift.min.js"></script>
<script src="../static/scripts/custom/polyfills.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../">Go Ethereum</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="../install/">Install</a></li>
<li><a href="../downloads/">Downloads</a></li>
<li class="active"><a href="../guide/">Guide</a></li>
</ul>
</div>
</div>
</nav>
<div class="container" style="padding-top: 24px;">
<div class="row">
<div class="col-md-3" id="toc" style="padding-top: 16px;"></div>
<div class="col-md-9" id="content"></div>
</div>
<hr/>
<footer>
<p>&copy; 2013-2016. The go-ethereum Authors.</p>
</footer>
</div>
<script type="text/javascript">
// Download the developer guide ToC and convert it into a guide sidebar
$.ajax({
url: 'https://raw.githubusercontent.com/wiki/ethereum/go-ethereum/Developer-Guide.md',
error: function() {
alert("Failed to load latest release!");
},
dataType: 'text',
success: function(data) {
// Iterate over all the lines of the sidebar markdown
var lines = data.split("\n");
var toc = $("#toc");
var menu;
var head;
for (var i = 0; i < lines.length; i++) {
// Skip any empty lines
var line = lines[i].trim();
if (line == "") {
continue;
}
// If the line is a heading, add a new menu entry
if (line[0] == "#") {
while (line.length > 0 && line[0] == "#") {
line = line.slice(1);
}
head = line.trim();
menu = $("<div class='list-group'></div>").appendTo(toc);
$("<a href='#' class='list-group-item active'>" + head + "</a>").appendTo(menu);
continue;
}
// Otherwise if the line is a link, add a new entry to the sub-menu
if (line[0] == "[") {
var name = /\[(.*)\]/g.exec(line)[1];
var id = (head + "-" + name).split(" ").join("-");
var link = /\((.*)\)/g.exec(line)[1];
link = "https://raw.githubusercontent.com/wiki/" + link.slice("https://github.com/".length).replace("wiki/", "") + ".md";
var item = $("<a id='menu-" + id + "' href='#" + id + "' class='list-group-item'>" + name + "</a>").appendTo(menu);
$(item).click(function(id, head, name, link) {
return function() {
$.ajax({
url: link,
error: function() {
$('#content').html("<div class='alert alert-dismissible alert-danger'>Failed to load guide page \"" + name + "\". Please report this issue on our <a href='https://github.com/ethereum/go-ethereum/issues' class='alert-link'>bug tracker</a>. Thank you!</div>");
},
dataType: 'text',
success: function(data) {
// Load the wiki page content into the current page
$('#content').html("<h1>" + head + ": " + name + "</h1>" + marked(data));
emojify.setConfig({img_dir: '../static/images/emoji'});
emojify.run(document.getElementById('content'));
// Run the syntax highlighter on all code blocks
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
}
});
};
}(id, head, name, link));
}
}
// Menu constructed, load the specified entry, or first if non existent
if (window.location.hash.length > 1) {
$('#menu-' + window.location.hash.split('#')[1])[0].click();
} else {
$(toc.children()[0]).children()[1].click();
}
}
});
</script>
The go-ethereum guide moved to <a href="https://geth.ethereum.org/docs/">https://geth.ethereum.org/docs/</a>
</body>
</html>

@ -1 +0,0 @@
hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"</",c:[e.CLCM,e.CBCM,{cN:"string",v:[e.QSM,{b:"'",e:"[^\\\\]'"},{b:"`",e:"`"}]},{cN:"number",v:[{b:e.CNR+"[dflsi]",r:1},e.CNM]},{b:/:=/},{cN:"function",bK:"func",e:/\s*\{/,eE:!0,c:[e.TM,{cN:"params",b:/\(/,e:/\)/,k:t,i:/["']/}]}]}});

@ -1 +0,0 @@
hljs.registerLanguage("gradle",function(e){return{cI:!0,k:{keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine"},c:[e.CLCM,e.CBCM,e.ASM,e.QSM,e.NM,e.RM]}});

@ -1 +0,0 @@
hljs.registerLanguage("java",function(e){var a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t=a+"(<"+a+"(\\s*,\\s*"+a+")*>)?",r="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:s,r:0};return{aliases:["jsp"],k:r,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});

@ -1 +0,0 @@
hljs.registerLanguage("swift",function(e){var t={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},i={cN:"type",b:"\\b[A-Z][\\wÀ-ʸ']*",r:0},n=e.C("/\\*","\\*/",{c:["self"]}),r={cN:"subst",b:/\\\(/,e:"\\)",k:t,c:[]},a={cN:"number",b:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",r:0},o=e.inherit(e.QSM,{c:[r,e.BE]});return r.c=[a],{k:t,c:[o,e.CLCM,n,i,a,{cN:"function",bK:"func",e:"{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{b:/</,e:/>/},{cN:"params",b:/\(/,e:/\)/,endsParent:!0,k:t,c:["self",a,o,e.CBCM,{b:":"}],i:/["']/}],i:/\[|%/},{cN:"class",bK:"struct protocol class extension enum",k:t,e:"\\{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{cN:"meta",b:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{bK:"import",e:/$/,c:[e.CLCM,n]}]}});

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save