Skip to content

Commit

Permalink
updates - works
Browse files Browse the repository at this point in the history
  • Loading branch information
dschach committed Oct 25, 2023
1 parent 777703e commit dd14224
Show file tree
Hide file tree
Showing 6 changed files with 543 additions and 427 deletions.
81 changes: 74 additions & 7 deletions demo/testcode.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,74 @@
/*!
Theme: Monokai
Author: Wimer Hazenberg (http://www.monokai.nl)
License: ~ MIT (or more permissive) [via base16-schemes-source]
Maintainer: @highlightjs/core-team
Version: 2021.09.0
*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#f8f8f2;background:#272822}.hljs ::selection,.hljs::selection{background-color:#49483e;color:#f8f8f2}.hljs-comment{color:#75715e}.hljs-tag{color:#a59f85}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#f8f8f2}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#f92672}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#fd971f}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#f4bf75}.hljs-strong{font-weight:700;color:#f4bf75}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#a6e22e}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#a1efe4}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#66d9ef}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#ae81ff}.hljs-emphasis{color:#ae81ff;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#c63}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700}
/*
Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
*/
.hljs {
color: #abb2bf;
background: #282c34;
}
.hljs-keyword, .hljs-operator {
color: #F92672;
}
.hljs-pattern-match {
color: #F92672;
}
.hljs-pattern-match .hljs-constructor {
color: #61aeee;
}
.hljs-function {
color: #61aeee;
}
.hljs-function .hljs-params {
color: #A6E22E;
}
.hljs-function .hljs-params .hljs-typing {
color: #FD971F;
}
.hljs-module-access .hljs-module {
color: #7e57c2;
}
.hljs-constructor {
color: #e2b93d;
}
.hljs-constructor .hljs-string {
color: #9CCC65;
}
.hljs-comment, .hljs-quote {
color: #b18eb1;
font-style: italic;
}
.hljs-doctag, .hljs-formula {
color: #c678dd;
}
.hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst {
color: #e06c75;
}
.hljs-literal {
color: #56b6c2;
}
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta .hljs-string {
color: #98c379;
}
.hljs-built_in,
.hljs-title.class_,
.hljs-class .hljs-title {
color: #e6c07b;
}
.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number {
color: #d19a66;
}
.hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title {
color: #61aeee;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-link {
text-decoration: underline;
}
26 changes: 17 additions & 9 deletions demo/testcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<!-- <script src="../src/languages/apex.js"/> -->
<link rel="stylesheet" href="./testcode.css" />
<script>

hljs.debugMode();
hljs.highlightAll();
</script>
Expand All @@ -20,8 +21,8 @@
</style>
</head>

<body>
<pre><code>
<body class="hljs">
<pre><code class="language-apex">
List&lt;SObject&gt; mylist = [SELECT Name, StreetAddress__c, COUNT(),
(SELECT Id FROM Contacts)
FROM Warehouse__c.Contacts__r
Expand All @@ -30,18 +31,24 @@
ORDER BY DISTANCE(Location__c, GEOLOCATION(37.775,-122.418), 'mi')
LIMIT 10];

delete myAccount;
delete [SELECT Id FROM Account];

Integer myInt = 8 - 7++;

public List<String> myString { get; set; }

List&lt;Opportunity&gt; opps = [SELECT Id FROM Opportunity WHERE Id NOT IN :newRecordsMap.keySet()];

String queryText =
'SELECT Id, Name, AccountId, FirstName, LastName, mailingstreet, mailingcity, mailingstate, mailingpostalcode, mailingcountry, ' +
String queryText = 'SELECT Id, Name, AccountId, FirstName, LastName, mailingstreet, mailingcity, mailingstate, mailingpostalcode, mailingcountry, ' +
'otherstreet, othercity, otherstate, otherpostalcode, othercountry, mailinglatitude, mailinglongitude, otherlatitude, otherlongitude ' +
'FROM Contact WHERE AccountId = :acctid ORDER BY ' +
String.escapeSingleQuotes(SortFullExp) +
' NULLS LAST LIMIT 1000';
String queryText = 'SELECT Id, Name, AccountId, FirstName, LastName, mailingstreet, mailingcity, mailingstate, mailingpostalcode, mailingcountry, '
</code></pre>
<p>-------NEW LANGUAGE----------</p>
<pre><code>
<pre><code class="language-apex">
@IsTest
private without sharing class myTestClass {
myMap?.get('Id');
Expand All @@ -52,7 +59,7 @@
<p>-------NEW LANGUAGE----------</p>
<pre><code class="language-apex">

Database.insert(myAccounts, AccessLevel.USER_MODE);
Database.insert(myAccounts, false, AccessLevel.USER_MODE);
delete myAccount;
delete [SELECT Id FROM Account];

Expand All @@ -64,6 +71,7 @@
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
'This is a string in a comment'
@throws DMLException
*/

/**
Expand Down Expand Up @@ -552,7 +560,7 @@
}
</code></pre>
<p>-------NEW LANGUAGE----------</p>
<pre><code>
<pre><code class="language-apex">
/**
* SHOULD BE RECOGNIZED AS JAVA
* @author John Smith
Expand Down Expand Up @@ -668,7 +676,7 @@
Boolean ai = (Boolean) false;
System.debug('Should not be called');
if (1 > 5) { // wtf!?
Database.insert(myAccounts, AccessLevel.USER_MODE);
Database.insert(myAccounts, true, AccessLevel.USER_MODE);
}
}

Expand Down Expand Up @@ -699,7 +707,7 @@
trigger CTrig on Custom__c (before insert){
System.debug('inserting a record');
upsert myRecord__c;
Database.upsert(myRecord__c, AccessLevel.USER_MODE);
Database.upsert(myRecord__c, false, AccessLevel.USER_MODE);
}

</code></pre>
Expand Down
Loading

0 comments on commit dd14224

Please sign in to comment.