diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index bdb0cabc87cf50106df6e15097dff816c8c3eb34..0000000000000000000000000000000000000000
--- a/.gitattributes
+++ /dev/null
@@ -1,17 +0,0 @@
-# Auto detect text files and perform LF normalization
-* text=auto
-
-# Custom for Visual Studio
-*.cs diff=csharp
-
-# Standard to msysgit
-*.doc diff=astextplain
-*.DOC diff=astextplain
-*.docx diff=astextplain
-*.DOCX diff=astextplain
-*.dot diff=astextplain
-*.DOT diff=astextplain
-*.pdf diff=astextplain
-*.PDF diff=astextplain
-*.rtf diff=astextplain
-*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
index cd2946ad76b4402e5b3cab9243a9281aad228670..37a4eb8b43d978ea05b2c6e3fb934f9b40dddd4d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,47 +1,15 @@
-# Windows image file caches
-Thumbs.db
-ehthumbs.db
-
-# Folder config file
-Desktop.ini
-
-# Recycle Bin used on file shares
-$RECYCLE.BIN/
-
-# Windows Installer files
-*.cab
-*.msi
-*.msm
-*.msp
-
-# Windows shortcuts
-*.lnk
-
-# =========================
-# Operating System Files
-# =========================
-
-# OSX
-# =========================
-
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
.DS_Store
-.AppleDouble
-.LSOverride
-
-# Thumbnails
-._*
-
-# Files that might appear in the root of a volume
-.DocumentRevisions-V100
-.fseventsd
-.Spotlight-V100
-.TemporaryItems
-.Trashes
-.VolumeIcon.icns
-
-# Directories potentially created on remote AFP share
-.AppleDB
-.AppleDesktop
-Network Trash Folder
-Temporary Items
-.apdisk
+/build
+/captures
+.externalNativeBuild
+/entry/.preview
+.cxx
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index dff5f3a5d02a71dcf47f617135ac04564aa75973..0000000000000000000000000000000000000000
--- a/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: java
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000000000000000000000000000000000000..1c6df917f8bdd3f093f1af344134a1455cd17254
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+## 0.0.1-SNAPSHOT
+* refactor: For module library Android-to-OpenHarmony
+
+## 2
+* 2
\ No newline at end of file
diff --git a/README.md b/README.md
index f56482024ee8b0d5b0a51fdd57e518557f50c51b..7ba95ec78d569e596b3a690281fc82c4feaac0de 100644
--- a/README.md
+++ b/README.md
@@ -1,73 +1,68 @@
-# Codeview
--------------
-http://avraampiperidis.github.io/Codeview/
-[](https://android-arsenal.com/details/1/3999)
-
-Codeview is a android library tha lets you
-preview code in webview very easy and simple with highlighs and colors.
-With styles to chooses and language.
-
-Also you can inject html and text into webview or any extended webview class.
-
-
-This library was inspired and is working thanks to [highlight.js](https://highlightjs.org/).
-Apps using Codeview library.
-https://play.google.com/store/apps/details?id=com.protectsoft.javatutorial
-https://play.google.com/store/apps/details?id=com.protectsoft.pythontutorial
-
-https://bintray.com/zeronerone/maven/Codeview#statistics
-
-Usage
------
-
-#### Codeview
-
-#### Download/Install Gradle
---------
-
-```groovy
-repositories {
- jcenter()
- }
-
-compile 'Codeview-1.0.0:webviewcode:1.0.0'
-```
-##### 1) Get a reference to your WebView or any extended WebView
-
-```java
-WebView webview = (WebView) findViewById(R.id.webview);
-//set settings here
-```
-
-##### 2) Basic usage. Default style is Original, and default language is java.
-
-```java
-//your string code
-String code = "public static void main(String[] args) { \n" +
- "\n" +
- "//comments\n" +
- " for(int i =0; i < 10; i++) {\n" +
- " addnum();\n" +
- " }\n" +
- "\n" +
- "}\n";
-
-Codeview.with(getApplicationContext())
- .withCode(code)
- .into(webview);
+# CodeView
+
+**本项目是基于开源项目 CodeView 进行OpenHarmony的移植和开发的,可以通过项目标签以及github地址( https://github.com/avraampiperidis/Codeview )追踪到原项目版本**
+
+#### 项目介绍
+- 项目名称:CodeView
+- 所属系列:OpenHarmony的第三方组件适配移植
+- 功能:代码块高亮显示。
+- 项目移植状态:完成
+- 调用差异:无
+- 开发版本:sdk5,DevEco Studio2.1 Beta4
+- 项目作者和维护人:蒋军
+- 联系方式:jiangjun073@chinasoftinc.com
+- 原项目Doc地址:https://github.com/avraampiperidis/Codeview
+- 基线版本:CodeView组件 Release 2
+- 编程语言:Java
+
+#### 安装教程
+1.在项目根目录下的build.gradle文件中,
+```gradle
+allprojects {
+ repositories {
+ maven {
+ url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
+ }
+ }
+}
```
-
-
-##### 3) set style and language.
-
-```java
-MyTouchWebView webview = (MyTouchWebView) findViewById(R.id.mytouchwebview);
-//set settings here
+2.在entry模块的build.gradle文件中,
+```gradle
+dependencies {
+ implementation('com.gitee.chinasoft_ohos:CodeView:0.0.1-SNAPSHOT')
+ ......
+}
```
-```java
-//your string java code
-String code = "public static void main(String[] args) { \n" +
+#### 使用说明
+
+1. 创建一个WebView对象,添加到页面中:
+ ```java
+ DirectionalLayout directionalLayout = (DirectionalLayout)findComponentById(ResourceTable.Id_dl);
+ webView = new WebView(getContext());
+ webView.setComponentSize(DirectionalLayout.LayoutConfig.MATCH_PARENT,
+ DirectionalLayout.LayoutConfig.MATCH_PARENT);
+ directionalLayout.addComponent(webView);
+ ```
+2. 基本用法:
+ ```java
+ String code = "public static void main(String[] args) { \n" +
+ "\n" +
+ "//comments\n" +
+ " for(int i =0; i < 10; i++) {\n" +
+ " addnum();\n" +
+ " }\n" +
+ "\n" +
+ "}\n";
+
+ Codeview.with(getApplicationContext())
+ .withCode(code)
+ .into(webview);
+ ```
+
+3. 设置css样式和语言类型:
+ ```java
+ String code = "public static void main(String[] args) { \n" +
"\n" +
"//comments\n" +
" for(int i =0; i < 10; i++) {\n" +
@@ -76,24 +71,15 @@ String code = "public static void main(String[] args) { \n" +
"\n" +
"}\n";
-Codeview.with(getApplicationContext())
+ Codeview.with(getApplicationContext())
.withCode(code)
.setStyle(Settings.WithStyle.DARKULA)
.setLang(Settings.Lang.JAVA)
.into(webview);
-```
-
-
-##### 4) Inject html head content and text.
-
-```java
-WebView webview = (WebView) findViewById(R.id.webview);
-//set settings here
-```
-
-```java
-//your string javascript code
- String code = "function Constructor(v1,v2,v3)\n" +
+ ```
+4. 注入html头部以及文本:.
+ ```java
+ String code = "function Constructor(v1,v2,v3)\n" +
"{\n" +
" this.v1 = v1;\n" +
" this.v2 = v2;\n" +
@@ -113,23 +99,41 @@ WebView webview = (WebView) findViewById(R.id.webview);
"}";
- Codeview.with(getApplicationContext())
- .setHtmlHeadContent("")
- .withHtml("
h1 injected header
")
- .withText("this text is always wrap inside pre tags")
- .withCode(code)
- .withHtml(" h1 header after code
")
- .withHtml("")
- .setStyle(Settings.WithStyle.DARKSTYLE)
- .setLang(Settings.Lang.JAVASCRIPT)
- .setAutoWrap(true)
- .into(webView);
-```
-
+ .withHtml(" h1 injected header
")
+ .withText("this text is always wrap inside pre tags")
+ .withCode(code)
+ .withHtml(" h1 header after code
")
+ .withHtml("")
+ .setStyle(Settings.WithStyle.DARKSTYLE)
+ .setLang(Settings.Lang.JAVASCRIPT)
+ .setAutoWrap(true)
+ .into(webView);
+ ```
+
+5. 注意事项:
+ 鸿蒙中,HTML里含有#字符,WebView会展示出错,拼接的HTML中,无论标签,css样式,js,文本,代码块不能带有#字符,鸿蒙中,HTML里含有#字符,WebView会展示出错,需要去除所有#字符,且使用到highlight.js中的#字符都用 ` 字符替代,代码块中也不能含有这个字符。
+
+#### 测试信息
+
+CodeCheck代码测试无异常
+
+CloudTest代码测试无异常
+
+火绒安全病毒安全检测通过
+
+当前版本demo功能与原组件基本无差异
+
+测试员:刘飞虎
+
+#### 版本迭代
+
+- 0.0.1-SNAPSHOT
## License
MIT License
@@ -153,5 +157,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-
-
diff --git a/build.gradle b/build.gradle
index 3a50be3a593a4d97033a1c309dc578fc28e30a60..1dc510ffd5a8d3abe3f2758e193a2619aca86563 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,42 +1,37 @@
-apply plugin: 'com.android.library'
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply plugin: 'com.huawei.ohos.app'
-android {
- compileSdkVersion 28
- buildToolsVersion '28.0.3'
- repositories {
- jcenter()
- google()
- }
+ohos {
+ compileSdkVersion 5
defaultConfig {
- minSdkVersion 16
- targetSdkVersion 28
- versionCode 2
- versionName "1.0"
+ compatibleSdkVersion 5
}
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+}
+
+buildscript {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
}
+ jcenter()
}
- testOptions {
- unitTests.returnDefaultValues = true
+ dependencies {
+ classpath 'com.huawei.ohos:hap:2.4.2.7'
+ classpath 'com.huawei.ohos:decctest:1.0.0.7'
}
}
-dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'junit:junit:4.12'
- implementation 'org.mockito:mockito-all:1.8.4'
-}
-
-buildscript {
+allprojects {
repositories {
- jcenter()
- google()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:3.3.1'
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ jcenter()
}
}
diff --git a/entry/.gitignore b/entry/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..796b96d1c402326528b4ba3c12ee9d92d0e212e9
--- /dev/null
+++ b/entry/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/entry/build.gradle b/entry/build.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..45bbf69c2365242508d9c5799dd7ccf5972950d0
--- /dev/null
+++ b/entry/build.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'com.huawei.ohos.hap'
+apply plugin: 'com.huawei.ohos.decctest'
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 5
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ implementation project(path: ':library')
+ testImplementation 'junit:junit:4.13'
+ ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100'
+}
+decc {
+ supportType = ['html', 'xml']
+}
diff --git a/entry/proguard-rules.pro b/entry/proguard-rules.pro
new file mode 100644
index 0000000000000000000000000000000000000000..f7666e47561d514b2a76d5a7dfbb43ede86da92a
--- /dev/null
+++ b/entry/proguard-rules.pro
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git a/entry/src/main/config.json b/entry/src/main/config.json
new file mode 100644
index 0000000000000000000000000000000000000000..9fe69b2fedf678eaa1de9a0edde2cc1fd6e2e034
--- /dev/null
+++ b/entry/src/main/config.json
@@ -0,0 +1,74 @@
+{
+ "app": {
+ "bundleName": "com.protectsoft.webviewcodedemo",
+ "vendor": "protectsoft",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 5,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.protectsoft.webviewcodedemo",
+ "name": ".MyApplication",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry"
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "name": "com.protectsoft.webviewcodedemo.MainAbility",
+ "icon": "$media:icon",
+ "description": "$string:mainability_description",
+ "label": "$string:app_name",
+ "type": "page",
+ "launchType": "standard",
+ "metaData": {
+ "customizeData": [
+ {
+ "name": "hwc-theme",
+ "value": "androidhwext:style/Theme.Emui.NoTitleBar"
+ }
+ ]
+ }
+ },
+ {
+ "orientation": "unspecified",
+ "name": "com.protectsoft.webviewcodedemo.ShowAbility",
+ "icon": "$media:icon",
+ "description": "$string:showability_description",
+ "label": "$string:app_name",
+ "type": "page",
+ "launchType": "standard",
+ "metaData": {
+ "customizeData": [
+ {
+ "name": "hwc-theme",
+ "value": "androidhwext:style/Theme.Emui.NoTitleBar"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/entry/src/main/java/com/protectsoft/webviewcodedemo/Constants.java b/entry/src/main/java/com/protectsoft/webviewcodedemo/Constants.java
new file mode 100644
index 0000000000000000000000000000000000000000..d6e9f57c61e86317bf59aa43fe5a7f360bd3b839
--- /dev/null
+++ b/entry/src/main/java/com/protectsoft/webviewcodedemo/Constants.java
@@ -0,0 +1,268 @@
+/*
+ * Copyright (C) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.protectsoft.webviewcodedemo;
+
+/**
+ * Constants
+ *
+ * @since 2021-04-30
+ */
+public class Constants {
+ /**
+ * SHOW_TYPE
+ */
+ public static final String SHOW_TYPE = "SHOW_TYPE";
+ /**
+ * SHOW_CODE
+ */
+ public static final String SHOW_CODE = "SHOW_CODE";
+ /**
+ * SHOW_LANG
+ */
+ public static final String SHOW_LANG = "SHOW_LANG";
+ /**
+ * Basic usage. Default style is Original, and default language is java.
+ */
+ public static final int DEFALUT_TYPE = 1;
+ /**
+ * set style and language.
+ */
+ public static final int OTHER_TYPE = 2;
+ /**
+ * Inject html head content and text.
+ */
+ public static final int OTHER1_TYPE = 3;
+ /**
+ * PYTHON_TYPE
+ */
+ public static final int PYTHON_TYPE = 4;
+ /**
+ * JAVASCRIPT_TYPE
+ */
+ public static final int JAVASCRIPT_TYPE = 5;
+ /**
+ * RUBY
+ */
+ public static final int RUBY_TYPE = 6;
+ /**
+ * CSHARP
+ */
+ public static final int CSHARP_TYPE = 7;
+ /**
+ * PHP
+ */
+ public static final int PHP_TYPE = 8;
+ /**
+ * SQL
+ */
+ public static final int SQL_TYPE = 9;
+ /**
+ * CPLUSPLUS
+ */
+ public static final int CPLUSPLUS_TYPE = 10;
+
+ /**
+ * DEFALUT_STRING
+ */
+ public static final String DEFALUT_STRING = "public static void main(String[] args) { \n"
+ + "\n" + "//comments\n"
+ + " for(int i =0; i < 10; i++) {\n"
+ + " addnum();\n"
+ + " }\n"
+ + "\n"
+ + "}\n";
+ /**
+ * OTHER_STRING
+ */
+ public static final String OTHER_STRING = "public static void main(String[] args) { \n"
+ + "\n" + "//comments\n"
+ + " for(int i =0; i < 10; i++) {\n"
+ + " addnum();\n"
+ + " }\n"
+ + "\n"
+ + "}\n";
+ /**
+ * OTHER1_STRING
+ */
+ public static final String OTHER1_STRING = "function Constructor(v1,v2,v3)\n" + "{\n"
+ + " this.v1 = v1;\n"
+ + " this.v2 = v2;\n"
+ + " this.funk = function()\n"
+ + " {\n"
+ + " console.log(\"Test: \"+ v3 );\n"
+ + " }\n"
+ + "}\n"
+ + "\n"
+ + "var obj1 = new Constructor(\"par1\",\"par2\",\"par3\");\n"
+ + "var arr = [\"w1\",\"w2\",\"w3\",obj1];\n" + "\n"
+ + "function f2()\n" + "{ \n"
+ + " obj1.funk(); //works ok\n"
+ + " console.log(\"test \"+tablica[3].funk.call() ); //doesn't work\n"
+ + "}";
+ /**
+ * PYTHON_STRING
+ */
+ public static final String PYTHON_STRING = "import random\n" +
+ "if __name__ ==\"__main__\":\n" +
+ " checkcode=\"\"\n" +
+ " for i in range(4):\n" +
+ " index=random.randrange(0,4)\n" +
+ " if index!=i and index +1 !=i:\n" +
+ " checkcode +=chr(random.randint(97,122))\n" +
+ " elif index +1==i:\n" +
+ " checkcode +=chr(random.randint(65,90) )\n" +
+ " else:\n" +
+ " checkcode +=str(random.randint(1,9))\n" +
+ " print(checkcode)";
+
+ /**
+ * RUBY_STRING
+ */
+ public static final String RUBY_STRING = "def fact(n) \n" +
+ " if n == 0 \n" +
+ " 1 \n" +
+ " else \n" +
+ " n * fact(n-1) \n" +
+ " end \n" +
+ "end \n" +
+ "print fact(ARGV[0].to_i), \"\\n\" ";
+
+ /**
+ * CSHARP_STRING
+ */
+ public static final String CSHARP_STRING = "class Program\n" +
+ " {\n" +
+ " static void Main(string[] args)\n" +
+ " {\n" +
+ " Transform t = new Transform();\n" +
+ " // t.GetVector().x = 10; 这边编译报错\n" +
+ " Vector v2 = t.GetVector();\n" +
+ " v2.x = 10;\n" +
+ " t.ShowV();\n" +
+ " Console.Read();\n" +
+ " }\n" +
+ " }\n" +
+ " \n" +
+ " struct Vector\n" +
+ " {\n" +
+ " public float x;\n" +
+ " public float y;\n" +
+ " public float z;\n" +
+ " }\n" +
+ " \n" +
+ " class Transform\n" +
+ " {\n" +
+ " public Vector v;\n" +
+ " //set\n" +
+ " public void SetVector(Vector v)\n" +
+ " {\n" +
+ " this.v = v;\n" +
+ " }\n" +
+ " //get\n" +
+ " public Vector GetVector()\n" +
+ " {\n" +
+ " return v;\n" +
+ " }\n" +
+ " \n" +
+ " public void ShowV()\n" +
+ " {\n" +
+ " Console.WriteLine(v.x + \"...\" + v.y + \"...\" + v.z);\n" +
+ " }\n" +
+ " }";
+
+ /**
+ * PHP_STRING
+ */
+ public static final String PHP_STRING = "function is_spam($text, $file, $split = ‘:‘, $regex = false){ \n" +
+ "$handle = fopen($file, ‘rb‘); \n" +
+ "$contents = fread($handle, filesize($file)); \n" +
+ "fclose($handle); \n" +
+ "$lines = explode(\"n\", $contents); \n" +
+ "$arr = array(); \n" +
+ "foreach($lines as $line){ \n" +
+ "list($word, $count) = explode($split, $line); \n" +
+ "if($regex) \n" +
+ "$arr[$word] = $count; \n" +
+ "else \n" +
+ "$arr[preg_quote($word)] = $count; \n" +
+ "} \n" +
+ "preg_match_all(\"~\".implode(‘|‘, array_keys($arr)).\"~\", $text, $matches); \n" +
+ "$temp = array(); \n" +
+ "foreach($matches[0] as $match){ \n" +
+ "if(!in_array($match, $temp)){ \n" +
+ "$temp[$match] = $temp[$match] + 1; \n" +
+ "if($temp[$match] >= $arr[$word]) \n" +
+ "return true; \n" +
+ "} \n" +
+ "} \n" +
+ "return false; \n" +
+ "} \n" +
+ "$file = ‘spam.txt‘; \n" +
+ "$str = ‘This string has cat, dog word‘; \n" +
+ "if(is_spam($str, $file)) \n" +
+ "echo ‘this is spam‘; \n" +
+ "else \n" +
+ "echo ‘this is not spam‘; \n" +
+ "ab:3 \n" +
+ "dog:3 \n" +
+ "cat:2 \n" +
+ "monkey:2 ";
+
+ /**
+ * SQL
+ */
+ public static final String SQL_STRING = "CREATE TABLE ENROLLS\n" +
+ "\n" +
+ " (SNO NUMERIC(6,0) NOT NULL\n" +
+ "\n" +
+ " CNO CHAR(4) NOT NULL\n" +
+ "\n" +
+ " GRADE INT\n" +
+ "\n" +
+ " PRIMARY KEY(SNO,CNO)\n" +
+ "\n" +
+ " FOREIGN KEY(SNO) REFERENCES STUDENTS(SNO)\n" +
+ "\n" +
+ " FOREIGN KEY(CNO) REFERENCES COURSES(CNO)\n" +
+ "\n" +
+ " CHECK ((GRADE IS NULL) OR (GRADE BETWEEN 0 AND 100)))";
+
+ /**
+ * SQL
+ */
+ public static final String CPLUSPLUS_STRING = "using namespace std;\n" +
+ " \n" +
+ "extern int a, b;\n" +
+ "extern int c;\n" +
+ "extern float f;\n" +
+ "int main()\n" +
+ "{\n" +
+ "\t//定义变量\n" +
+ "\tint a, b;\n" +
+ "\tint c;\n" +
+ "\tfloat f;\n" +
+ "\t\n" +
+ "\t//实际初始化\n" +
+ "\ta = 10;\n" +
+ "\tb = 20;\n" +
+ "\tc=a+b;\n" +
+ "\t\n" +
+ "\tcout << c << endl;\n" +
+ "\tf = 70.0/3.0;\n" +
+ "\tcout << f << endl;\n" +
+ "\treturn 0;\n" +
+ "}";
+}
diff --git a/entry/src/main/java/com/protectsoft/webviewcodedemo/MainAbility.java b/entry/src/main/java/com/protectsoft/webviewcodedemo/MainAbility.java
new file mode 100644
index 0000000000000000000000000000000000000000..3a8e310302953c12d1cffdc6e2b131b1022c39da
--- /dev/null
+++ b/entry/src/main/java/com/protectsoft/webviewcodedemo/MainAbility.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.protectsoft.webviewcodedemo;
+
+import com.protectsoft.webviewcode.Settings;
+
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+import ohos.aafwk.content.Operation;
+import ohos.agp.components.Button;
+
+/**
+ * MainAbility
+ *
+ * @since 2021-04-30
+ */
+public class MainAbility extends Ability {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_main);
+ Button btnDefalut = (Button)findComponentById(ResourceTable.Id_btn_defalut);
+ btnDefalut.setClickedListener(component ->
+ jumpAbilityByType(Constants.DEFALUT_TYPE,Constants.DEFALUT_STRING, Settings.Lang.JAVA));
+ Button btnOther = (Button)findComponentById(ResourceTable.Id_btn_other);
+ btnOther.setClickedListener(component ->
+ jumpAbilityByType(Constants.OTHER_TYPE,Constants.OTHER_STRING, Settings.Lang.JAVA));
+ Button btnOther1 = (Button)findComponentById(ResourceTable.Id_btn_other1);
+ btnOther1.setClickedListener(component ->
+ jumpAbilityByType(Constants.OTHER1_TYPE,Constants.OTHER1_STRING, Settings.Lang.JAVASCRIPT));
+ Button btnPython = (Button)findComponentById(ResourceTable.Id_btn_python);
+ btnPython.setClickedListener(component ->
+ jumpAbilityByType(Constants.PYTHON_TYPE,Constants.PYTHON_STRING, Settings.Lang.PYTHON));
+ Button btnJavascript = (Button)findComponentById(ResourceTable.Id_btn_javascript);
+ btnJavascript.setClickedListener(component ->
+ jumpAbilityByType(Constants.JAVASCRIPT_TYPE,Constants.OTHER1_STRING, Settings.Lang.JAVASCRIPT));
+ Button btnRuby = (Button)findComponentById(ResourceTable.Id_btn_ruby);
+ btnRuby.setClickedListener(component ->
+ jumpAbilityByType(Constants.RUBY_TYPE,Constants.RUBY_STRING, Settings.Lang.RUBY));
+ Button btnCs = (Button)findComponentById(ResourceTable.Id_btn_cs);
+ btnCs.setClickedListener(component ->
+ jumpAbilityByType(Constants.CSHARP_TYPE,Constants.CSHARP_STRING, Settings.Lang.CSHARP));
+ Button btnPhp = (Button)findComponentById(ResourceTable.Id_btn_php);
+ btnPhp.setClickedListener(component ->
+ jumpAbilityByType(Constants.PHP_TYPE,Constants.PHP_STRING, Settings.Lang.PHP));
+ Button btnSql = (Button)findComponentById(ResourceTable.Id_btn_sql);
+ btnSql.setClickedListener(component ->
+ jumpAbilityByType(Constants.SQL_TYPE,Constants.SQL_STRING, Settings.Lang.SQL));
+ Button btnCpp = (Button)findComponentById(ResourceTable.Id_btn_cpp);
+ btnCpp.setClickedListener(component ->
+ jumpAbilityByType(Constants.CPLUSPLUS_TYPE,Constants.CPLUSPLUS_STRING, Settings.Lang.CPLUSPLUS));
+ }
+
+ private void jumpAbilityByType(int type,String code,String lang) {
+ Intent intent = new Intent();
+ intent.setParam(Constants.SHOW_TYPE, type);
+ intent.setParam(Constants.SHOW_CODE, code);
+ intent.setParam(Constants.SHOW_LANG, lang);
+ Operation mOperation = new Intent.OperationBuilder()
+ .withDeviceId("")
+ .withBundleName(getBundleName())
+ .withAbilityName(ShowAbility.class.getName())
+ .build();
+ intent.setOperation(mOperation);
+ startAbility(intent);
+ }
+}
diff --git a/entry/src/main/java/com/protectsoft/webviewcodedemo/MyApplication.java b/entry/src/main/java/com/protectsoft/webviewcodedemo/MyApplication.java
new file mode 100644
index 0000000000000000000000000000000000000000..2ebdf24a1935173516b459b075ab72ec08b724ca
--- /dev/null
+++ b/entry/src/main/java/com/protectsoft/webviewcodedemo/MyApplication.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.protectsoft.webviewcodedemo;
+
+import ohos.aafwk.ability.AbilityPackage;
+
+/**
+ * MyApplication
+ *
+ * @since 2021-04-30
+ */
+public class MyApplication extends AbilityPackage {
+ @Override
+ public void onInitialize() {
+ super.onInitialize();
+ }
+}
diff --git a/entry/src/main/java/com/protectsoft/webviewcodedemo/ShowAbility.java b/entry/src/main/java/com/protectsoft/webviewcodedemo/ShowAbility.java
new file mode 100644
index 0000000000000000000000000000000000000000..28346c8851b794f696e27cffa483fadc53ac8438
--- /dev/null
+++ b/entry/src/main/java/com/protectsoft/webviewcodedemo/ShowAbility.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2021 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.protectsoft.webviewcodedemo;
+
+import com.protectsoft.webviewcode.Codeview;
+import com.protectsoft.webviewcode.Settings;
+
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+import ohos.agp.components.DirectionalLayout;
+import ohos.agp.components.Text;
+import ohos.agp.components.webengine.WebView;
+
+/**
+ * ShowAbility
+ *
+ * @since 2021-04-30
+ */
+public class ShowAbility extends Ability {
+ private static final int NUM_20 = 20;
+ private final int[] resIds = {
+ ResourceTable.Id_btn_default,ResourceTable.Id_btn_agate,
+ ResourceTable.Id_btn_ANDROIDSTUDIO,ResourceTable.Id_btn_ARDUINO_LIGHT,ResourceTable.Id_btn_ARTA,
+ ResourceTable.Id_btn_ASCETIC,ResourceTable.Id_btn_ATELIER_DARK,ResourceTable.Id_btn_ATELIER_LIGHT,
+ ResourceTable.Id_btn_ATELIER_FOREST_DARK,ResourceTable.Id_btn_DARKSTYLE,
+ ResourceTable.Id_btn_DARKULA,ResourceTable.Id_btn_DOCCO,ResourceTable.Id_btn_FAR,
+ ResourceTable.Id_btn_GITHUB,ResourceTable.Id_btn_GITHUBGIST,
+ ResourceTable.Id_btn_GOOGLECODE,ResourceTable.Id_btn_IDEA,ResourceTable.Id_btn_MAGULA,
+ ResourceTable.Id_btn_OBSIDIAN,ResourceTable.Id_btn_XCODE};
+ private final String[] styles = {
+ Settings.WithStyle.DEFAULT,Settings.WithStyle.AGATE,
+ Settings.WithStyle.ANDROIDSTUDIO,Settings.WithStyle.ARDUINO_LIGHT,Settings.WithStyle.ARTA,
+ Settings.WithStyle.ASCETIC,Settings.WithStyle.ATELIER_DARK,
+ Settings.WithStyle.ATELIER_LIGHT,Settings.WithStyle.ATELIER_FOREST_DARK,Settings.WithStyle.DARKSTYLE,
+ Settings.WithStyle.DARKULA,Settings.WithStyle.DOCCO,
+ Settings.WithStyle.FAR,Settings.WithStyle.GITHUB,Settings.WithStyle.GITHUBGIST,
+ Settings.WithStyle.GOOGLECODE,Settings.WithStyle.IDEA,
+ Settings.WithStyle.MAGULA,Settings.WithStyle.OBSIDIAN,Settings.WithStyle.XCODE};
+ private final Button[] buttons = new Button[NUM_20];
+ private Text textStyle;
+ private Text textAutoWrap;
+ private boolean isMyAutoWrap = false;
+ private WebView webView;
+ private Intent mIntent;
+ private int mPosition = 0;
+
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_show);
+ DirectionalLayout directionalLayout = (DirectionalLayout)findComponentById(ResourceTable.Id_dl);
+ webView = new WebView(getContext());
+ webView.setComponentSize(DirectionalLayout.LayoutConfig.MATCH_PARENT,
+ DirectionalLayout.LayoutConfig.MATCH_PARENT);
+ directionalLayout.addComponent(webView);
+ mIntent = intent;
+ initView();
+ }
+
+ private void initView() {
+ textStyle = (Text) findComponentById(ResourceTable.Id_t_style);
+ textAutoWrap = (Text) findComponentById(ResourceTable.Id_t_AutoWrap);
+ for (int i = 0;i < NUM_20;i++) {
+ Button button = (Button)findComponentById(resIds[i]);
+ int finalI = i;
+ button.setClickedListener(component -> setView(button.getText(), finalI,isMyAutoWrap));
+ buttons[i] = button;
+ }
+ Button button = (Button)findComponentById(ResourceTable.Id_btn_AutoWrap);
+ button.setClickedListener(component -> {
+ isMyAutoWrap = !isMyAutoWrap;
+ setView(buttons[mPosition].getText(),mPosition,isMyAutoWrap);
+ });
+ setView(buttons[mPosition].getText(),mPosition,isMyAutoWrap);
+ }
+
+ private void setView(String style,int position,boolean isAutoWrap) {
+ mPosition = position;
+ textStyle.setText(style);
+ textAutoWrap.setText(String.valueOf(isAutoWrap));
+ if (mIntent.getIntParam(Constants.SHOW_TYPE,1) == Constants.OTHER1_TYPE) {
+ Codeview.with(getApplicationContext())
+ .setHtmlHeadContent("")
+ .withHtml(" h1 injected header
")
+ .withText("this text is always wrap inside pre tags")
+ .withCode(Constants.OTHER1_STRING)
+ .withHtml(" h1 header after code
")
+ .withHtml("")
+ .setStyle(styles[position])
+ .setLang(Settings.Lang.JAVASCRIPT)
+ .setAutoWrap(isAutoWrap)
+ .into(webView);
+ } else {
+ Codeview.with(getApplicationContext())
+ .withCode(mIntent.getStringParam(Constants.SHOW_CODE))
+ .setLang(mIntent.getStringParam(Constants.SHOW_LANG))
+ .setStyle(styles[position])
+ .setAutoWrap(isAutoWrap)
+ .into(webView);
+ }
+ }
+}
diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..ffc4254b06bca8a64e6ee04b39a44f49ce5f94e9
--- /dev/null
+++ b/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,20 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "CodeView"
+ },
+ {
+ "name": "mainability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ },
+ {
+ "name": "HelloWorld",
+ "value": "Hello World"
+ },
+ {
+ "name": "showability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/entry/src/main/resources/base/graphic/background_ability_main.xml b/entry/src/main/resources/base/graphic/background_ability_main.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c0c0a3df480fa387a452b9c40ca191cc918a3fc0
--- /dev/null
+++ b/entry/src/main/resources/base/graphic/background_ability_main.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/entry/src/main/resources/base/graphic/background_ability_show.xml b/entry/src/main/resources/base/graphic/background_ability_show.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a002c2353e78af3a15235e00738328ff566bc085
--- /dev/null
+++ b/entry/src/main/resources/base/graphic/background_ability_show.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/entry/src/main/resources/base/graphic/background_bt_color.xml b/entry/src/main/resources/base/graphic/background_bt_color.xml
new file mode 100644
index 0000000000000000000000000000000000000000..86bb1b3969b1b480e45c076758b437aa1257a7d0
--- /dev/null
+++ b/entry/src/main/resources/base/graphic/background_bt_color.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/entry/src/main/resources/base/graphic/background_text_color.xml b/entry/src/main/resources/base/graphic/background_text_color.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3bef41fd175930f55fb8fd0549eec107c5beb8c4
--- /dev/null
+++ b/entry/src/main/resources/base/graphic/background_text_color.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/entry/src/main/resources/base/layout/ability_main.xml b/entry/src/main/resources/base/layout/ability_main.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5329d3c46d55383b7776cf488032b581efbe05a8
--- /dev/null
+++ b/entry/src/main/resources/base/layout/ability_main.xml
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/entry/src/main/resources/base/layout/ability_show.xml b/entry/src/main/resources/base/layout/ability_show.xml
new file mode 100644
index 0000000000000000000000000000000000000000..69bc209aee14ccfca1325b566131746abd92f001
--- /dev/null
+++ b/entry/src/main/resources/base/layout/ability_show.xml
@@ -0,0 +1,396 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/entry/src/main/resources/base/media/icon.png b/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c
Binary files /dev/null and b/entry/src/main/resources/base/media/icon.png differ
diff --git a/entry/src/ohosTest/config.json b/entry/src/ohosTest/config.json
new file mode 100644
index 0000000000000000000000000000000000000000..771dfe51ad52409151a63fa01d98d0df6d131e6b
--- /dev/null
+++ b/entry/src/ohosTest/config.json
@@ -0,0 +1,41 @@
+{
+ "app": {
+ "bundleName": "com.protectsoft.webviewcodedemo",
+ "vendor": "protectsoft",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 5,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.protectsoft.webviewcodedemo",
+ "name": "testModule",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry_test",
+ "moduleType": "feature",
+ "installationFree": true
+ },
+ "abilities": [
+ {
+ "name": "decc.testkit.runner.EntryAbility",
+ "description": "Test Entry Ability",
+ "icon": "$media:icon",
+ "label": "$string:app_name",
+ "launchType": "standard",
+ "orientation": "landscape",
+ "visible": true,
+ "type": "page"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/entry/src/ohosTest/java/com/protectsoft/webviewcodedemo/ExampleOhosTest.java b/entry/src/ohosTest/java/com/protectsoft/webviewcodedemo/ExampleOhosTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..2633ebd649733b168f1f805b63101c22e7964db4
--- /dev/null
+++ b/entry/src/ohosTest/java/com/protectsoft/webviewcodedemo/ExampleOhosTest.java
@@ -0,0 +1,14 @@
+package com.protectsoft.webviewcodedemo;
+
+import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class ExampleOhosTest {
+ @Test
+ public void testBundleName() {
+ final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName();
+ assertEquals("com.protectsoft.webviewcodedemo", actualBundleName);
+ }
+}
\ No newline at end of file
diff --git a/entry/src/test/java/com/protectsoft/webviewcodedemo/ExampleTest.java b/entry/src/test/java/com/protectsoft/webviewcodedemo/ExampleTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..6cd7b3f1f56dab76aa6494a38884fb8fd6dbcba2
--- /dev/null
+++ b/entry/src/test/java/com/protectsoft/webviewcodedemo/ExampleTest.java
@@ -0,0 +1,9 @@
+package com.protectsoft.webviewcodedemo;
+
+import org.junit.Test;
+
+public class ExampleTest {
+ @Test
+ public void onStart() {
+ }
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000000000000000000000000000000000000..0daf1830fbdef07e50a44d74210c8c82f1b66278
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,10 @@
+# Project-wide Gradle settings.
+# IDE (e.g. DevEco Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# If the Chinese output is garbled, please configure the following parameter.
+# org.gradle.jvmargs=-Dfile.encoding=GBK
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000000000000000000000000000000000000..490fda8577df6c95960ba7077c43220e5bb2c0d9
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000000000000000000000000000000000..f59159e865d4b59feb1b8c44b001f62fc5d58df4
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000000000000000000000000000000000000..2fe81a7d95e4f9ad2c9b2a046707d36ceb3980b3
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,183 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000000000000000000000000000000000000..62bd9b9ccefea2b65ae41e5d9a545e2021b90a1d
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,103 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/library/.gitignore b/library/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..796b96d1c402326528b4ba3c12ee9d92d0e212e9
--- /dev/null
+++ b/library/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/library/build.gradle b/library/build.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..25ddf0cf1daa8f1533639ebc05ce352f4019b8ff
--- /dev/null
+++ b/library/build.gradle
@@ -0,0 +1,21 @@
+apply plugin: 'com.huawei.ohos.library'
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 5
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ testImplementation 'junit:junit:4.13'
+}
diff --git a/library/proguard-rules.pro b/library/proguard-rules.pro
new file mode 100644
index 0000000000000000000000000000000000000000..f7666e47561d514b2a76d5a7dfbb43ede86da92a
--- /dev/null
+++ b/library/proguard-rules.pro
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git a/library/src/main/config.json b/library/src/main/config.json
new file mode 100644
index 0000000000000000000000000000000000000000..69cff0527c18dbb4d9d9672364639bb5b2af58e8
--- /dev/null
+++ b/library/src/main/config.json
@@ -0,0 +1,28 @@
+{
+ "app": {
+ "bundleName": "com.protectsoft.webviewcodedemo",
+ "vendor": "protectsoft",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 5,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {
+ },
+ "module": {
+ "package": "com.protectsoft.webviewcode",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "library",
+ "moduleType": "har"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/protectsoft/webviewcode/Codeview.java b/library/src/main/java/com/protectsoft/webviewcode/Codeview.java
similarity index 46%
rename from src/main/java/com/protectsoft/webviewcode/Codeview.java
rename to library/src/main/java/com/protectsoft/webviewcode/Codeview.java
index 190d893106c47784a470e0fe494853304a68b2e3..87a238a6f4c7ceb6eec47096583df677b79a7aa5 100644
--- a/src/main/java/com/protectsoft/webviewcode/Codeview.java
+++ b/library/src/main/java/com/protectsoft/webviewcode/Codeview.java
@@ -1,83 +1,89 @@
package com.protectsoft.webviewcode;
-import android.content.Context;
-import android.os.Build;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
+import ohos.agp.components.webengine.WebConfig;
+import ohos.agp.components.webengine.WebView;
+import ohos.app.Context;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
/**
+ * Codeview
*
+ * @since 2021-04-30
*/
-public class Codeview {
-
- final static String DEFAULT_STYLE = Settings.WithStyle.DEFAULT;
- final static String DEFAULT_LANG = Settings.Lang.JAVA;
-
- //not used..yet
- private Object webview;
-
+public class Codeview {
+ static final String DEFAULT_STYLE = Settings.WithStyle.DEFAULT;
+ static final String DEFAULT_LANG = Settings.Lang.JAVA;
+ /**
+ * NUM_2
+ */
+ private static final int NUM_2 = 2;
+ /**
+ * NUM_3
+ */
+ private static final int NUM_3 = 3;
+ /**
+ * NUM_4
+ */
+ private static final int NUM_4 = 4;
private static volatile Codeview singleton = null;
- private final Context context;
-
private static String[] htmlWrapper;
private static List contents;
-
+ private final Context mContext;
private boolean isTextWrap = false;
-
private String style;
private String language;
+ private Object mWebview;
-
+ /**
+ * Codeview
+ *
+ * @param context context
+ */
public Codeview(Context context) {
-
- this.context = context;
+ mContext = context;
htmlWrapper = new String[]{"","","","",""};
- contents = new ArrayList();
+ contents = new ArrayList<>();
language = DEFAULT_LANG;
style = DEFAULT_STYLE;
}
-
/**
+ * Double-checked locking Singleton
*
- * @param context
- * @return
- *
- * Double-checked locking Singleton
+ * @param context context
+ * @return Codeview
*/
public static Codeview with(Context context) {
resetCache();
- if(singleton == null) {
+ if (singleton == null) {
synchronized (Codeview.class) {
- if(singleton == null) {
+ if (singleton == null) {
singleton = new Builder(context).build();
}
}
}
-
return singleton;
}
-
/**
+ * withCode
*
* @param code the code will be highlight
- * @return
+ * @return Codeview
*/
public Codeview withCode(String code) {
appender(new Content(code,Content.TYPE_CODE));
return this;
}
-
/**
+ * withText
*
* @param text will be treated as simple text no highlight
- * @return
+ * @return Codeview
*/
public Codeview withText(String text) {
appender(new Content(text,Content.TYPE_TEXT));
@@ -85,49 +91,51 @@ public class Codeview {
}
/**
+ * withHtml
*
- * @param html will add html code right after ,
- * can call multiple times to append extra html code into body section
- * @return
+ * @param html will add html code right after ,can call multiple times to append extra html code into body section
+ * @return Codeview
*/
public Codeview withHtml(String html) {
appender(new Content(html,Content.TYPE_HTML));
return this;
}
-
/**
+ * setHtmlHeadContent
*
* @param htmlHeadContent set link,css,javascript tags inside
- * @return
+ * @return Codeview
*/
public Codeview setHtmlHeadContent(String htmlHeadContent) {
htmlWrapper[1] += htmlHeadContent + " \n";
return this;
}
-
/**
+ * setStyle
*
- * @param style set the highlight style for the code
- * if style is null or empty Default style will be applied.
- * @return
- * @see com.protectsoft.webviewcode.Settings.WithStyle
+ * @param style set the highlight style for the code if style is null or empty Default style will be applied.
+ * @return Codeview
+ * @see Settings.WithStyle
*/
public Codeview setStyle(String style) {
-
- if(style != null && !style.isEmpty()) {
+ if (style != null && !style.isEmpty()) {
this.style = style;
} else {
this.style = DEFAULT_STYLE;
}
-
return this;
}
-
+ /**
+ * setLang
+ *
+ * @param lang lang
+ * @return Codeview
+ */
public Codeview setLang(String lang) {
- if(lang != null && !lang.isEmpty()) {
+ if (lang != null && !lang.isEmpty()) {
this.language = lang;
} else {
this.language = DEFAULT_LANG;
@@ -136,207 +144,197 @@ public class Codeview {
return this;
}
-
-
- public Codeview setAutoWrap(boolean wrap) {
- this.isTextWrap = wrap;
+ /**
+ * setAutoWrap
+ *
+ * @param isWrap wrap
+ * @return Codeview
+ */
+ public Codeview setAutoWrap(boolean isWrap) {
+ this.isTextWrap = isWrap;
return this;
}
/**
+ * into WebView
*
* @param webview or any subclass of webview
- * @param
+ * @param T
+ * @throws IllegalArgumentException IllegalArgumentException
*/
public void into(T webview) {
-
- if(webview == null) {
+ if (webview == null) {
throw new IllegalArgumentException("webview cannot be null");
}
- //checkWebview(webview);
-
- if(!webview.getSettings().getJavaScriptEnabled()) {
- webview.getSettings().setJavaScriptEnabled(true);
+ if (!webview.getWebConfig().isJavaScriptPermitted()) {
+ webview.getWebConfig().setJavaScriptPermit(true);
}
- String htmlDocument = Builder.makeDocument(htmlWrapper, new Options(this.isTextWrap, this.style, this.language,this.contents));
- webview.loadDataWithBaseURL(null, htmlDocument, "text/html", "utf-8", "");
-
+ String htmlDocument = Builder.makeDocument(htmlWrapper,
+ new Options(this.isTextWrap, this.style, this.language, contents));
+ webview.load(htmlDocument,
+ "text/html", "utf-8", "", null);
}
-
/**
+ * getWebConfig
*
- * @return
+ * @return WebConfig
*/
- public WebSettings getWebSettings() {
- return ((WebView)webview).getSettings();
+ public WebConfig getWebConfig() {
+ return ((WebView)mWebview).getWebConfig();
}
-
private void appender(Content con) {
- this.contents.add(con);
+ contents.add(con);
}
-
/**
- * builder class...
+ * Builder
+ *
+ * @since 2021-04-30
*/
- private static class Builder {
-
+ private static class Builder {
private final Context context;
/**
+ * Builder
*
- * @param context
+ * @param context context
*/
- public Builder(Context context) {
-
- if(context == null) {
+ Builder(Context context) {
+ if (context == null) {
throw new IllegalArgumentException("Context can't be null");
}
-
this.context = context.getApplicationContext();
}
-
/**
+ * build
*
- * @return
+ * @return Codeview
*/
public Codeview build() {
return new Codeview(this.context);
}
-
/**
+ * makeDocument
*
* @param content the array string containing the code,text and headers
* @param options the users options
* @return the complete html document
*/
- static String makeDocument(String content[], Options options) {
-
+ static String makeDocument(String[] content, Options options) {
content[0] = HtmlCode.HTML_HEAD + "\n";
content[1] = content[1] + " \n";
content[1] = content[1] + " \n";
-
- if(options.isTextWrap) {
+ if (options.isTextWrap) {
content[1] = content[1] + " \n";
}
-
- content[1] = content[1] + " \n";
- content[2] = HtmlCode.HTML_HEAD_END + "\n";
-
- content[3] += extractBuildContent(options.contents,options.isTextWrap,options.lang);
-
- content[4] = HtmlCode.HTML_BODY_END + " \n";
-
- return content[0] + content[1] + content[2] + content[3] + content[4];
+ content[1] = content[1] + " \n";
+ content[NUM_2] = HtmlCode.HTML_HEAD_END + "\n";
+ content[NUM_3] += extractBuildContent(options.contents,options.isTextWrap,options.lang);
+ content[NUM_4] = HtmlCode.HTML_BODY_END + " \n";
+ return content[0] + content[1] + content[NUM_2] + content[NUM_3] + content[NUM_4];
}
-
-
-
}
-
-
+ /**
+ * Options
+ *
+ * @since 2021-04-30
+ */
private static class Options {
-
private final boolean isTextWrap;
private final String style;
private final String lang;
private final List contents;
- public Options(boolean isTextWrap,String style,String lang,List contents) {
+ /**
+ * Options
+ *
+ * @param isTextWrap isTextWrap
+ * @param style style
+ * @param lang lang
+ * @param contents contents
+ */
+ Options(boolean isTextWrap,String style,String lang,List contents) {
this.isTextWrap = isTextWrap;
this.style = style;
this.lang = lang;
this.contents = contents;
}
-
-
}
-
/**
+ * extractBuildContent
*
- * @param contents
- * @return
+ * @param contentList contentList
+ * @return String
*/
- private static String extractBuildContent(List contents,boolean isTextWrap,String language) {
- if(!contents.isEmpty()) {
-
- String content = "";
-
- for(int i =0; i < contents.size(); i++) {
-
- if(contents.get(i).getType().equals(Content.TYPE_CODE)) {
-
- if(isTextWrap) {
- content += HtmlCode.HTML_PRE_CODE_WRAP_START + language + HtmlCode.HTML_PRE_CODE_CLASS + contents.get(i).getText() + HtmlCode.HTML_PRE_CODE_END;
+ private static String extractBuildContent(List contentList,boolean isTextWrap,String language) {
+ if (!contentList.isEmpty()) {
+ StringBuilder content = new StringBuilder();
+ for (Content value : contentList) {
+ if (value.getType().equals(Content.TYPE_CODE)) {
+ if (isTextWrap) {
+ content.append(HtmlCode.HTML_PRE_CODE_WRAP_START)
+ .append(language).append(HtmlCode.HTML_PRE_CODE_CLASS)
+ .append(value.getText()).append(HtmlCode.HTML_PRE_CODE_END);
} else {
- content += HtmlCode.HTML_PRE_CODE_START + language + HtmlCode.HTML_PRE_CODE_CLASS + contents.get(i).getText() + HtmlCode.HTML_PRE_CODE_END;
+ content.append(HtmlCode.HTML_PRE_CODE_START)
+ .append(language).append(HtmlCode.HTML_PRE_CODE_CLASS)
+ .append(value.getText()).append(HtmlCode.HTML_PRE_CODE_END);
}
-
- } else if(contents.get(i).getType().equals(Content.TYPE_HTML)) {
- content += contents.get(i).getText();
+ } else if (value.getType().equals(Content.TYPE_HTML)) {
+ content.append(value.getText());
} else {
- content += HtmlCode.HTML_PRE_TEXT_START + contents.get(i).getText() + HtmlCode.HTML_PRE_TEXT_END;
+ content.append(HtmlCode.HTML_PRE_TEXT_START)
+ .append(value.getText()).append(HtmlCode.HTML_PRE_TEXT_END);
}
-
}
-
- return content;
+ return content.toString();
}
- return null;
+ return "";
}
-
-
- private void checkWebview(T webview) {
- if(Build.VERSION.SDK_INT < 18) {
- webview.clearView();
-
- } else {
- webview.loadDataWithBaseURL(null, "about:blank", "text/html", "utf-8", "");
- }
+ private void checkWebview(T checkWebview) {
+ checkWebview.load("about:blank", "text/html", "utf-8", "", null);
}
-
- private static void resetCache() {
+ private static void resetCache() {
contents = new ArrayList();
htmlWrapper = new String[]{"","","","",""};
}
/**
+ * getAllCodeStyles
*
- * @return a list with all supported styles
- * @see com.protectsoft.webviewcode.Settings.WithStyle
+ * @return List
+ * @see Settings.WithStyle
*/
static List getAllCodeStyles() {
Field[] fields = Settings.WithStyle.class.getFields();
List styles = new ArrayList();
- for(Field f : fields) {
- styles.add(f.getName());
+ for (Field filed : fields) {
+ styles.add(filed.getName());
}
return styles;
}
-
/**
+ * getAllLanguages
*
- * @return
+ * @return List
*/
static List getAllLanguages() {
Field[] fields = Settings.Lang.class.getFields();
List langs = new ArrayList();
- for(Field f : fields) {
- langs.add(f.getName());
+ for (Field filed : fields) {
+ langs.add(filed.getName());
}
return langs;
}
-
-
}
diff --git a/src/main/java/com/protectsoft/webviewcode/Content.java b/library/src/main/java/com/protectsoft/webviewcode/Content.java
similarity index 80%
rename from src/main/java/com/protectsoft/webviewcode/Content.java
rename to library/src/main/java/com/protectsoft/webviewcode/Content.java
index d2e82490c50549899b8137dde7261e0e1c601144..8c89216741ac5efe439472c08803a0965f708845 100644
--- a/src/main/java/com/protectsoft/webviewcode/Content.java
+++ b/library/src/main/java/com/protectsoft/webviewcode/Content.java
@@ -1,23 +1,28 @@
package com.protectsoft.webviewcode;
/**
+ * Content
*
+ * @since 2021-04-30
*/
public class Content {
-
static final String TYPE_TEXT = "text";
static final String TYPE_CODE = "code";
static final String TYPE_HTML = "html";
-
private String text;
private String type;
+ /**
+ * Content
+ *
+ * @param text text
+ * @param type type
+ */
public Content(String text,String type) {
this.text = text;
this.type = type;
}
-
public String getText() {
return this.text;
}
@@ -25,6 +30,4 @@ public class Content {
public String getType() {
return this.type;
}
-
-
}
diff --git a/src/main/java/com/protectsoft/webviewcode/HighlightLib.java b/library/src/main/java/com/protectsoft/webviewcode/HighlightLib.java
similarity index 86%
rename from src/main/java/com/protectsoft/webviewcode/HighlightLib.java
rename to library/src/main/java/com/protectsoft/webviewcode/HighlightLib.java
index 8ac70568e89c6739b2296277ea205a82aff0acc4..f571580177ca69e0af85469302c4171598d181d8 100644
--- a/src/main/java/com/protectsoft/webviewcode/HighlightLib.java
+++ b/library/src/main/java/com/protectsoft/webviewcode/HighlightLib.java
@@ -1,18 +1,15 @@
package com.protectsoft.webviewcode;
/**
- *
* i transferred the highlight.js library here so i can inject the code into the webview
* so no external resources is needed
+ *
+ * @since 2021-04-30
*/
- final class HighlightLib {
-
-
- final static String HIGHLIGHTJS = "!function(e){var n=\"object\"==typeof window&&window||\"object\"==typeof self&&self;\"undefined\"!=typeof exports?e(exports):n&&(n.hljs=e({}),\"function\"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/gm,\"&\").replace(//gm,\">\")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+\" \";if(i+=e.parentNode?e.parentNode.className:\"\",t=/\\blang(?:uage)?-([\\w-]+)\\b/i.exec(i))return w(t[1])?t[1]:\"no-highlight\";for(i=i.split(/\\s+/),n=0,r=i.length;r>n;n++)if(w(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:\"start\",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:\"stop\",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset\"}function u(e){f+=\"\"+t(e)+\">\"}function c(e){(\"start\"==e.event?o:u)(e.node)}for(var s=0,f=\"\",l=[];e.length||r.length;){var g=i();if(f+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){l.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);l.reverse().forEach(o)}else\"start\"==g[0].event?l.push(g[0].node):l.pop(),c(g.splice(0,1)[0])}return f+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),\"m\"+(e.cI?\"i\":\"\")+(r?\"g\":\"\"))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(\" \").forEach(function(e){var t=e.split(\"|\");u[t[0]]=[n,t[1]?Number(t[1]):1]})};\"string\"==typeof a.k?c(\"keyword\",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\\b\\w+\\b/,!0),i&&(a.bK&&(a.b=\"\\\\b(\"+a.bK.split(\" \").join(\"|\")+\")\\\\b\"),a.b||(a.b=/\\B|\\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\\B|\\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||\"\",a.eW&&i.tE&&(a.tE+=(a.e?\"|\":\"\")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push(\"self\"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var f=a.c.map(function(e){return e.bK?\"\\\\.?(\"+e.b+\")\\\\.?\":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=f.length?t(f.join(\"|\"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){for(var t=0;t\";return i+=e+'\">',i+n+o}function h(){if(!k.k)return n(M);var e=\"\",t=0;k.lR.lastIndex=0;for(var r=k.lR.exec(M);r;){e+=n(M.substr(t,r.index-t));var a=g(k,r);a?(B+=a[1],e+=p(a[0],n(r[0]))):e+=n(r[0]),t=k.lR.lastIndex,r=k.lR.exec(M)}return e+n(M.substr(t))}function d(){var e=\"string\"==typeof k.sL;if(e&&!R[k.sL])return n(M);var t=e?f(k.sL,M,!0,y[k.sL]):l(M,k.sL.length?k.sL:void 0);return k.r>0&&(B+=t.r),e&&(y[k.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=void 0!==k.sL?d():h(),M=\"\"}function v(e,n){L+=e.cN?p(e.cN,\"\",!0):\"\",k=Object.create(e,{parent:{value:k}})}function m(e,n){if(M+=e,void 0===n)return b(),0;var t=o(n,k);if(t)return t.skip?M+=n:(t.eB&&(M+=n),b(),t.rB||t.eB||(M=n)),v(t,n),t.rB?0:n.length;var r=u(k,n);if(r){var a=k;a.skip?M+=n:(a.rE||a.eE||(M+=n),b(),a.eE&&(M=n));do k.cN&&(L+=\"\"),k.skip||(B+=k.r),k=k.parent;while(k!=r.parent);return r.starts&&v(r.starts,\"\"),a.rE?0:n.length}if(c(n,k))throw new Error('Illegal lexeme \"'+n+'\" for mode \"'+(k.cN||\"\")+'\"');return M+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: \"'+e+'\"');s(N);var x,k=i||N,y={},L=\"\";for(x=k;x!=N;x=x.parent)x.cN&&(L=p(x.cN,\"\",!0)+L);var M=\"\",B=0;try{for(var C,j,I=0;;){if(k.t.lastIndex=I,C=k.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),x=k;x.parent;x=x.parent)x.cN&&(L+=\"\");return{r:B,value:L,language:e,top:k}}catch(O){if(-1!=O.message.indexOf(\"Illegal\"))return{r:0,value:n(t)};throw O}}function l(e,t){t=t||E.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(w(n)){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return E.tabReplace&&(e=e.replace(/^((<[^>]+>|\\t)+)/gm,function(e,n){return n.replace(/\\t/g,E.tabReplace)})),E.useBR&&(e=e.replace(/\\n/g,\"
\")),e}function p(e,n,t){var r=n?x[n]:t,a=[e.trim()];return e.match(/\\bhljs\\b/)||a.push(\"hljs\"),-1===e.indexOf(r)&&a.push(r),a.join(\" \").trim()}function h(e){var n=i(e);if(!a(n)){var t;E.useBR?(t=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\"),t.innerHTML=e.innerHTML.replace(/\\n/g,\"\").replace(/
/g,\"\\n\")):t=e;var r=t.textContent,o=n?f(n,r,!0):l(r),s=u(t);if(s.length){var h=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\");h.innerHTML=o.value,o.value=c(s,u(h),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=p(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){E=o(E,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll(\"pre code\");Array.prototype.forEach.call(e,h)}}function v(){addEventListener(\"DOMContentLoaded\",b,!1),addEventListener(\"load\",b,!1)}function m(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){x[e]=n})}function N(){return Object.keys(R)}function w(e){return e=(e||\"\").toLowerCase(),R[e]||R[x[e]]}var E={classPrefix:\"hljs-\",tabReplace:null,useBR:!1,languages:void 0},R={},x={};return e.highlight=f,e.highlightAuto=l,e.fixMarkup=g,e.highlightBlock=h,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=w,e.inherit=o,e.IR=\"[a-zA-Z]\\\\w*\",e.UIR=\"[a-zA-Z_]\\\\w*\",e.NR=\"\\\\b\\\\d+(\\\\.\\\\d+)?\",e.CNR=\"(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)\",e.BNR=\"\\\\b(0b[01]+)\",e.RSR=\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\",e.BE={b:\"\\\\\\\\[\\\\s\\\\S]\",r:0},e.ASM={cN:\"string\",b:\"'\",e:\"'\",i:\"\\\\n\",c:[e.BE]},e.QSM={cN:\"string\",b:'\"',e:'\"',i:\"\\\\n\",c:[e.BE]},e.PWM={b:/\\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\\b/},e.C=function(n,t,r){var a=e.inherit({cN:\"comment\",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:\"doctag\",b:\"(?:TODO|FIXME|NOTE|BUG|XXX):\",r:0}),a},e.CLCM=e.C(\"//\",\"$\"),e.CBCM=e.C(\"/\\\\*\",\"\\\\*/\"),e.HCM=e.C(\"#\",\"$\"),e.NM={cN:\"number\",b:e.NR,r:0},e.CNM={cN:\"number\",b:e.CNR,r:0},e.BNM={cN:\"number\",b:e.BNR,r:0},e.CSSNM={cN:\"number\",b:e.NR+\"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?\",r:0},e.RM={cN:\"regexp\",b:/\\//,e:/\\/[gimuy]*/,i:/\\n/,c:[e.BE,{b:/\\[/,e:/\\]/,r:0,c:[e.BE]}]},e.TM={cN:\"title\",b:e.IR,r:0},e.UTM={cN:\"title\",b:e.UIR,r:0},e.METHOD_GUARD={b:\"\\\\.\\\\s*\"+e.UIR,r:0},e});hljs.registerLanguage(\"sql\",function(e){var t=e.C(\"--\",\"$\");return{cI:!0,i:/[<>{}*]/,c:[{bK:\"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke\",e:/;/,eW:!0,k:{keyword:\"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek\",literal:\"true false null\",built_in:\"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void\"},c:[{cN:\"string\",b:\"'\",e:\"'\",c:[e.BE,{b:\"''\"}]},{cN:\"string\",b:'\"',e:'\"',c:[e.BE,{b:'\"\"'}]},{cN:\"string\",b:\"`\",e:\"`\",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage(\"php\",function(e){var c={b:\"\\\\$+[a-zA-Z_\u007F-ÿ][a-zA-Z0-9_\u007F-ÿ]*\"},a={cN:\"meta\",b:/<\\?(php)?|\\?>/},i={cN:\"string\",c:[e.BE,a],v:[{b:'b\"',e:'\"'},{b:\"b'\",e:\"'\"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},t={v:[e.BNM,e.CNM]};return{aliases:[\"php3\",\"php4\",\"php5\",\"php6\"],cI:!0,k:\"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally\",c:[e.HCM,e.C(\"//\",\"$\",{c:[a]}),e.C(\"/\\\\*\",\"\\\\*/\",{c:[{cN:\"doctag\",b:\"@[A-Za-z]+\"}]}),e.C(\"__halt_compiler.+?;\",!1,{eW:!0,k:\"__halt_compiler\",l:e.UIR}),{cN:\"string\",b:/<<<['\"]?\\w+['\"]?$/,e:/^\\w+;?$/,c:[e.BE,{cN:\"subst\",v:[{b:/\\$\\w+/},{b:/\\{\\$/,e:/\\}/}]}]},a,c,{b:/(::|->)+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/},{cN:\"function\",bK:\"function\",e:/[;{]/,eE:!0,i:\"\\\\$|\\\\[|%\",c:[e.UTM,{cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",c:[\"self\",c,e.CBCM,i,t]}]},{cN:\"class\",bK:\"class interface\",e:\"{\",eE:!0,i:/[:\\(\\$\"]/,c:[{bK:\"extends implements\"},e.UTM]},{bK:\"namespace\",e:\";\",i:/[\\.']/,c:[e.UTM]},{bK:\"use\",e:\";\",c:[e.UTM]},{b:\"=>\"},i,t]}});hljs.registerLanguage(\"cs\",function(e){var t=\"abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield\",r=e.IR+\"(<\"+e.IR+\">)?\";return{aliases:[\"csharp\"],k:t,i:/::/,c:[e.C(\"///\",\"$\",{rB:!0,c:[{cN:\"doctag\",v:[{b:\"///\",r:0},{b:\"\"},{b:\"?\",e:\">\"}]}]}),e.CLCM,e.CBCM,{cN:\"meta\",b:\"#\",e:\"$\",k:{\"meta-keyword\":\"if else elif endif define undef warning error line region endregion pragma checksum\"}},{cN:\"string\",b:'@\"',e:'\"',c:[{b:'\"\"'}]},e.ASM,e.QSM,e.CNM,{bK:\"class interface\",e:/[{;=]/,i:/[^\\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:\"namespace\",e:/[{;=]/,i:/[^\\s:]/,c:[e.inherit(e.TM,{b:\"[a-zA-Z](\\\\.?\\\\w)*\"}),e.CLCM,e.CBCM]},{bK:\"new return throw await\",r:0},{cN:\"function\",b:\"(\"+r+\"\\\\s+)+\"+e.IR+\"\\\\s*\\\\(\",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+\"\\\\s*\\\\(\",rB:!0,c:[e.TM],r:0},{cN:\"params\",b:/\\(/,e:/\\)/,eB:!0,eE:!0,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage(\"ruby\",function(e){var b=\"[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?\",c=\"and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor\",r={cN:\"doctag\",b:\"@[A-Za-z]+\"},a={b:\"#<\",e:\">\"},s=[e.C(\"#\",\"$\",{c:[r]}),e.C(\"^\\\\=begin\",\"^\\\\=end\",{c:[r],r:10}),e.C(\"^__END__\",\"\\\\n$\")],n={cN:\"subst\",b:\"#\\\\{\",e:\"}\",k:c},t={cN:\"string\",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/\"/,e:/\"/},{b:/`/,e:/`/},{b:\"%[qQwWx]?\\\\(\",e:\"\\\\)\"},{b:\"%[qQwWx]?\\\\[\",e:\"\\\\]\"},{b:\"%[qQwWx]?{\",e:\"}\"},{b:\"%[qQwWx]?<\",e:\">\"},{b:\"%[qQwWx]?/\",e:\"/\"},{b:\"%[qQwWx]?%\",e:\"%\"},{b:\"%[qQwWx]?-\",e:\"-\"},{b:\"%[qQwWx]?\\\\|\",e:\"\\\\|\"},{b:/\\B\\?(\\\\\\d{1,3}|\\\\x[A-Fa-f0-9]{1,2}|\\\\u[A-Fa-f0-9]{4}|\\\\?\\S)\\b/}]},i={cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",endsParent:!0,k:c},d=[t,a,{cN:\"class\",bK:\"class module\",e:\"$|;\",i:/=/,c:[e.inherit(e.TM,{b:\"[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?\"}),{b:\"<\\\\s*\",c:[{b:\"(\"+e.IR+\"::)?\"+e.IR}]}].concat(s)},{cN:\"function\",bK:\"def\",e:\"$|;\",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{cN:\"symbol\",b:e.UIR+\"(\\\\!|\\\\?)?:\",r:0},{cN:\"symbol\",b:\":\",c:[t,{b:b}],r:0},{cN:\"number\",b:\"(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b\",r:0},{b:\"(\\\\$\\\\W)|((\\\\$|\\\\@\\\\@?)(\\\\w+))\"},{b:\"(\"+e.RSR+\")\\\\s*\",c:[a,{cN:\"regexp\",c:[e.BE,n],i:/\\n/,v:[{b:\"/\",e:\"/[a-z]*\"},{b:\"%r{\",e:\"}[a-z]*\"},{b:\"%r\\\\(\",e:\"\\\\)[a-z]*\"},{b:\"%r!\",e:\"![a-z]*\"},{b:\"%r\\\\[\",e:\"\\\\][a-z]*\"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var o=\"[>?]>\",l=\"[\\\\w#]+\\\\(\\\\w+\\\\):\\\\d+:\\\\d+>\",u=\"(\\\\w+-)?\\\\d+\\\\.\\\\d+\\\\.\\\\d(p\\\\d+)?[^>]+>\",w=[{b:/^\\s*=>/,starts:{e:\"$\",c:d}},{cN:\"meta\",b:\"^(\"+o+\"|\"+l+\"|\"+u+\")\",starts:{e:\"$\",c:d}}];return{aliases:[\"rb\",\"gemspec\",\"podspec\",\"thor\",\"irb\"],k:c,i:/\\/\\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage(\"javascript\",function(e){return{aliases:[\"js\",\"jsx\"],k:{keyword:\"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as\",literal:\"true false null undefined NaN Infinity\",built_in:\"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise\"},c:[{cN:\"meta\",r:10,b:/^\\s*['\"]use (strict|asm)['\"]/},{cN:\"meta\",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:\"string\",b:\"`\",e:\"`\",c:[e.BE,{cN:\"subst\",b:\"\\\\$\\\\{\",e:\"\\\\}\"}]},e.CLCM,e.CBCM,{cN:\"number\",v:[{b:\"\\\\b(0[bB][01]+)\"},{b:\"\\\\b(0[oO][0-7]+)\"},{b:e.CNR}],r:0},{b:\"(\"+e.RSR+\"|\\\\b(case|return|throw)\\\\b)\\\\s*\",k:\"return throw case\",c:[e.CLCM,e.CBCM,e.RM,{b:/,e:/(\\/\\w+|\\w+\\/)>/,sL:\"xml\",c:[{b:/<\\w+\\/>/,skip:!0},{b:/<\\w+/,e:/(\\/\\w+|\\w+\\/)>/,skip:!0,c:[\"self\"]}]}],r:0},{cN:\"function\",bK:\"function\",e:/\\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:\"params\",b:/\\(/,e:/\\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\\[|%/},{b:/\\$[(.]/},e.METHOD_GUARD,{cN:\"class\",bK:\"class\",e:/[{;=]/,eE:!0,i:/[:\"\\[\\]]/,c:[{bK:\"extends\"},e.UTM]},{bK:\"constructor\",e:/\\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage(\"java\",function(e){var a=e.UIR+\"(<\"+e.UIR+\"(\\\\s*,\\\\s*\"+e.UIR+\")*>)?\",t=\"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\",r=\"\\\\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:r,r:0};return{aliases:[\"jsp\"],k:t,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:\"(\"+a+\"\\\\s+)+\"+e.UIR+\"\\\\s*\\\\(\",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.UIR+\"\\\\s*\\\\(\",rB:!0,r:0,c:[e.UTM]},{cN:\"params\",b:/\\(/,e:/\\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:\"meta\",b:\"@[A-Za-z]+\"}]}});hljs.registerLanguage(\"python\",function(e){var r={cN:\"meta\",b:/^(>>>|\\.\\.\\.) /},b={cN:\"string\",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?\"\"\"/,e:/\"\"\"/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)\"/,e:/\"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)\"/,e:/\"/},e.ASM,e.QSM]},a={cN:\"number\",r:0,v:[{b:e.BNR+\"[lLjJ]?\"},{b:\"\\\\b(0o[0-7]+)[lLjJ]?\"},{b:e.CNR+\"[lLjJ]?\"}]},l={cN:\"params\",b:/\\(/,e:/\\)/,c:[\"self\",r,a,b]};return{aliases:[\"py\",\"gyp\"],k:{keyword:\"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False\",built_in:\"Ellipsis NotImplemented\"},i:/(<\\/|->|\\?)/,c:[r,a,b,e.HCM,{v:[{cN:\"function\",bK:\"def\",r:10},{cN:\"class\",bK:\"class\"}],e:/:/,i:/[${=;\\n,]/,c:[e.UTM,l,{b:/->/,eW:!0,k:\"None\"}]},{cN:\"meta\",b:/^[\\t ]*@/,e:/$/},{b:/\\b(print|exec)\\(/}]}});hljs.registerLanguage(\"cpp\",function(t){var e={cN:\"keyword\",b:\"\\\\b[a-z\\\\d_]*_t\\\\b\"},r={cN:\"string\",v:[t.inherit(t.QSM,{b:'((u8?|U)|L)?\"'}),{b:'(u8?|U)?R\"',e:'\"',c:[t.BE]},{b:\"'\\\\\\\\?.\",e:\"'\",i:\".\"}]},i={cN:\"number\",v:[{b:\"\\\\b(\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)(u|U|l|L|ul|UL|f|F)\"},{b:t.CNR}],r:0},s={cN:\"meta\",b:\"#\",e:\"$\",k:{\"meta-keyword\":\"if else elif endif define undef warning error line pragma ifdef ifndef\"},c:[{b:/\\\\\\n/,r:0},{bK:\"include\",e:\"$\",k:{\"meta-keyword\":\"include\"},c:[t.inherit(r,{cN:\"meta-string\"}),{cN:\"meta-string\",b:\"<\",e:\">\",i:\"\\\\n\"}]},r,t.CLCM,t.CBCM]},a=t.IR+\"\\\\s*\\\\(\",c={keyword:\"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong\",built_in:\"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr\",literal:\"true false nullptr NULL\"};return{aliases:[\"c\",\"cc\",\"h\",\"c++\",\"h++\",\"hpp\"],k:c,i:\"\",c:[e,t.CLCM,t.CBCM,i,r,s,{b:\"\\\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\\\s*<\",e:\">\",k:c,c:[\"self\",e]},{b:t.IR+\"::\",k:c},{bK:\"new throw return else\",r:0},{cN:\"function\",b:\"(\"+t.IR+\"[\\\\*&\\\\s]+)+\"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\\w\\s\\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:\"params\",b:/\\(/,e:/\\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,i]},t.CLCM,t.CBCM,s]}]}});";
+final class HighlightLib {
+ static final String HIGHLIGHTJS = "!function(e){var n=\"object\"==typeof window&&window||\"object\"==typeof self&&self;\"undefined\"!=typeof exports?e(exports):n&&(n.hljs=e({}),\"function\"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/gm,\"&\").replace(//gm,\">\")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+\" \";if(i+=e.parentNode?e.parentNode.className:\"\",t=/\\blang(?:uage)?-([\\w-]+)\\b/i.exec(i))return w(t[1])?t[1]:\"no-highlight\";for(i=i.split(/\\s+/),n=0,r=i.length;r>n;n++)if(w(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:\"start\",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:\"stop\",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset\"}function u(e){f+=\"\"+t(e)+\">\"}function c(e){(\"start\"==e.event?o:u)(e.node)}for(var s=0,f=\"\",l=[];e.length||r.length;){var g=i();if(f+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){l.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);l.reverse().forEach(o)}else\"start\"==g[0].event?l.push(g[0].node):l.pop(),c(g.splice(0,1)[0])}return f+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),\"m\"+(e.cI?\"i\":\"\")+(r?\"g\":\"\"))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(\" \").forEach(function(e){var t=e.split(\"|\");u[t[0]]=[n,t[1]?Number(t[1]):1]})};\"string\"==typeof a.k?c(\"keyword\",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\\b\\w+\\b/,!0),i&&(a.bK&&(a.b=\"\\\\b(\"+a.bK.split(\" \").join(\"|\")+\")\\\\b\"),a.b||(a.b=/\\B|\\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\\B|\\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||\"\",a.eW&&i.tE&&(a.tE+=(a.e?\"|\":\"\")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push(\"self\"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var f=a.c.map(function(e){return e.bK?\"\\\\.?(\"+e.b+\")\\\\.?\":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=f.length?t(f.join(\"|\"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){for(var t=0;t\";return i+=e+'\">',i+n+o}function h(){if(!k.k)return n(M);var e=\"\",t=0;k.lR.lastIndex=0;for(var r=k.lR.exec(M);r;){e+=n(M.substr(t,r.index-t));var a=g(k,r);a?(B+=a[1],e+=p(a[0],n(r[0]))):e+=n(r[0]),t=k.lR.lastIndex,r=k.lR.exec(M)}return e+n(M.substr(t))}function d(){var e=\"string\"==typeof k.sL;if(e&&!R[k.sL])return n(M);var t=e?f(k.sL,M,!0,y[k.sL]):l(M,k.sL.length?k.sL:void 0);return k.r>0&&(B+=t.r),e&&(y[k.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=void 0!==k.sL?d():h(),M=\"\"}function v(e,n){L+=e.cN?p(e.cN,\"\",!0):\"\",k=Object.create(e,{parent:{value:k}})}function m(e,n){if(M+=e,void 0===n)return b(),0;var t=o(n,k);if(t)return t.skip?M+=n:(t.eB&&(M+=n),b(),t.rB||t.eB||(M=n)),v(t,n),t.rB?0:n.length;var r=u(k,n);if(r){var a=k;a.skip?M+=n:(a.rE||a.eE||(M+=n),b(),a.eE&&(M=n));do k.cN&&(L+=\"\"),k.skip||(B+=k.r),k=k.parent;while(k!=r.parent);return r.starts&&v(r.starts,\"\"),a.rE?0:n.length}if(c(n,k))throw new Error('Illegal lexeme \"'+n+'\" for mode \"'+(k.cN||\"\")+'\"');return M+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: \"'+e+'\"');s(N);var x,k=i||N,y={},L=\"\";for(x=k;x!=N;x=x.parent)x.cN&&(L=p(x.cN,\"\",!0)+L);var M=\"\",B=0;try{for(var C,j,I=0;;){if(k.t.lastIndex=I,C=k.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),x=k;x.parent;x=x.parent)x.cN&&(L+=\"\");return{r:B,value:L,language:e,top:k}}catch(O){if(-1!=O.message.indexOf(\"Illegal\"))return{r:0,value:n(t)};throw O}}function l(e,t){t=t||E.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(w(n)){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return E.tabReplace&&(e=e.replace(/^((<[^>]+>|\\t)+)/gm,function(e,n){return n.replace(/\\t/g,E.tabReplace)})),E.useBR&&(e=e.replace(/\\n/g,\"
\")),e}function p(e,n,t){var r=n?x[n]:t,a=[e.trim()];return e.match(/\\bhljs\\b/)||a.push(\"hljs\"),-1===e.indexOf(r)&&a.push(r),a.join(\" \").trim()}function h(e){var n=i(e);if(!a(n)){var t;E.useBR?(t=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\"),t.innerHTML=e.innerHTML.replace(/\\n/g,\"\").replace(/
/g,\"\\n\")):t=e;var r=t.textContent,o=n?f(n,r,!0):l(r),s=u(t);if(s.length){var h=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\");h.innerHTML=o.value,o.value=c(s,u(h),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=p(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){E=o(E,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll(\"pre code\");Array.prototype.forEach.call(e,h)}}function v(){addEventListener(\"DOMContentLoaded\",b,!1),addEventListener(\"load\",b,!1)}function m(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){x[e]=n})}function N(){return Object.keys(R)}function w(e){return e=(e||\"\").toLowerCase(),R[e]||R[x[e]]}var E={classPrefix:\"hljs-\",tabReplace:null,useBR:!1,languages:void 0},R={},x={};return e.highlight=f,e.highlightAuto=l,e.fixMarkup=g,e.highlightBlock=h,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=w,e.inherit=o,e.IR=\"[a-zA-Z]\\\\w*\",e.UIR=\"[a-zA-Z_]\\\\w*\",e.NR=\"\\\\b\\\\d+(\\\\.\\\\d+)?\",e.CNR=\"(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)\",e.BNR=\"\\\\b(0b[01]+)\",e.RSR=\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\",e.BE={b:\"\\\\\\\\[\\\\s\\\\S]\",r:0},e.ASM={cN:\"string\",b:\"'\",e:\"'\",i:\"\\\\n\",c:[e.BE]},e.QSM={cN:\"string\",b:'\"',e:'\"',i:\"\\\\n\",c:[e.BE]},e.PWM={b:/\\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\\b/},e.C=function(n,t,r){var a=e.inherit({cN:\"comment\",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:\"doctag\",b:\"(?:TODO|FIXME|NOTE|BUG|XXX):\",r:0}),a},e.CLCM=e.C(\"//\",\"$\"),e.CBCM=e.C(\"/\\\\*\",\"\\\\*/\"),e.HCM=e.C(\"`\",\"$\"),e.NM={cN:\"number\",b:e.NR,r:0},e.CNM={cN:\"number\",b:e.CNR,r:0},e.BNM={cN:\"number\",b:e.BNR,r:0},e.CSSNM={cN:\"number\",b:e.NR+\"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?\",r:0},e.RM={cN:\"regexp\",b:/\\//,e:/\\/[gimuy]*/,i:/\\n/,c:[e.BE,{b:/\\[/,e:/\\]/,r:0,c:[e.BE]}]},e.TM={cN:\"title\",b:e.IR,r:0},e.UTM={cN:\"title\",b:e.UIR,r:0},e.METHOD_GUARD={b:\"\\\\.\\\\s*\"+e.UIR,r:0},e});hljs.registerLanguage(\"sql\",function(e){var t=e.C(\"--\",\"$\");return{cI:!0,i:/[<>{}*]/,c:[{bK:\"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke\",e:/;/,eW:!0,k:{keyword:\"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek\",literal:\"true false null\",built_in:\"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void\"},c:[{cN:\"string\",b:\"'\",e:\"'\",c:[e.BE,{b:\"''\"}]},{cN:\"string\",b:'\"',e:'\"',c:[e.BE,{b:'\"\"'}]},{cN:\"string\",b:\"`\",e:\"`\",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage(\"php\",function(e){var c={b:\"\\\\$+[a-zA-Z_\u007F-ÿ][a-zA-Z0-9_\u007F-ÿ]*\"},a={cN:\"meta\",b:/<\\?(php)?|\\?>/},i={cN:\"string\",c:[e.BE,a],v:[{b:'b\"',e:'\"'},{b:\"b'\",e:\"'\"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},t={v:[e.BNM,e.CNM]};return{aliases:[\"php3\",\"php4\",\"php5\",\"php6\"],cI:!0,k:\"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally\",c:[e.HCM,e.C(\"//\",\"$\",{c:[a]}),e.C(\"/\\\\*\",\"\\\\*/\",{c:[{cN:\"doctag\",b:\"@[A-Za-z]+\"}]}),e.C(\"__halt_compiler.+?;\",!1,{eW:!0,k:\"__halt_compiler\",l:e.UIR}),{cN:\"string\",b:/<<<['\"]?\\w+['\"]?$/,e:/^\\w+;?$/,c:[e.BE,{cN:\"subst\",v:[{b:/\\$\\w+/},{b:/\\{\\$/,e:/\\}/}]}]},a,c,{b:/(::|->)+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/},{cN:\"function\",bK:\"function\",e:/[;{]/,eE:!0,i:\"\\\\$|\\\\[|%\",c:[e.UTM,{cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",c:[\"self\",c,e.CBCM,i,t]}]},{cN:\"class\",bK:\"class interface\",e:\"{\",eE:!0,i:/[:\\(\\$\"]/,c:[{bK:\"extends implements\"},e.UTM]},{bK:\"namespace\",e:\";\",i:/[\\.']/,c:[e.UTM]},{bK:\"use\",e:\";\",c:[e.UTM]},{b:\"=>\"},i,t]}});hljs.registerLanguage(\"cs\",function(e){var t=\"abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield\",r=e.IR+\"(<\"+e.IR+\">)?\";return{aliases:[\"csharp\"],k:t,i:/::/,c:[e.C(\"///\",\"$\",{rB:!0,c:[{cN:\"doctag\",v:[{b:\"///\",r:0},{b:\"\"},{b:\"?\",e:\">\"}]}]}),e.CLCM,e.CBCM,{cN:\"meta\",b:\"`\",e:\"$\",k:{\"meta-keyword\":\"if else elif endif define undef warning error line region endregion pragma checksum\"}},{cN:\"string\",b:'@\"',e:'\"',c:[{b:'\"\"'}]},e.ASM,e.QSM,e.CNM,{bK:\"class interface\",e:/[{;=]/,i:/[^\\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:\"namespace\",e:/[{;=]/,i:/[^\\s:]/,c:[e.inherit(e.TM,{b:\"[a-zA-Z](\\\\.?\\\\w)*\"}),e.CLCM,e.CBCM]},{bK:\"new return throw await\",r:0},{cN:\"function\",b:\"(\"+r+\"\\\\s+)+\"+e.IR+\"\\\\s*\\\\(\",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+\"\\\\s*\\\\(\",rB:!0,c:[e.TM],r:0},{cN:\"params\",b:/\\(/,e:/\\)/,eB:!0,eE:!0,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage(\"ruby\",function(e){var b=\"[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?\",c=\"and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor\",r={cN:\"doctag\",b:\"@[A-Za-z]+\"},a={b:\"`<\",e:\">\"},s=[e.C(\"`\",\"$\",{c:[r]}),e.C(\"^\\\\=begin\",\"^\\\\=end\",{c:[r],r:10}),e.C(\"^__END__\",\"\\\\n$\")],n={cN:\"subst\",b:\"`\\\\{\",e:\"}\",k:c},t={cN:\"string\",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/\"/,e:/\"/},{b:/`/,e:/`/},{b:\"%[qQwWx]?\\\\(\",e:\"\\\\)\"},{b:\"%[qQwWx]?\\\\[\",e:\"\\\\]\"},{b:\"%[qQwWx]?{\",e:\"}\"},{b:\"%[qQwWx]?<\",e:\">\"},{b:\"%[qQwWx]?/\",e:\"/\"},{b:\"%[qQwWx]?%\",e:\"%\"},{b:\"%[qQwWx]?-\",e:\"-\"},{b:\"%[qQwWx]?\\\\|\",e:\"\\\\|\"},{b:/\\B\\?(\\\\\\d{1,3}|\\\\x[A-Fa-f0-9]{1,2}|\\\\u[A-Fa-f0-9]{4}|\\\\?\\S)\\b/}]},i={cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",endsParent:!0,k:c},d=[t,a,{cN:\"class\",bK:\"class module\",e:\"$|;\",i:/=/,c:[e.inherit(e.TM,{b:\"[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?\"}),{b:\"<\\\\s*\",c:[{b:\"(\"+e.IR+\"::)?\"+e.IR}]}].concat(s)},{cN:\"function\",bK:\"def\",e:\"$|;\",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{cN:\"symbol\",b:e.UIR+\"(\\\\!|\\\\?)?:\",r:0},{cN:\"symbol\",b:\":\",c:[t,{b:b}],r:0},{cN:\"number\",b:\"(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b\",r:0},{b:\"(\\\\$\\\\W)|((\\\\$|\\\\@\\\\@?)(\\\\w+))\"},{b:\"(\"+e.RSR+\")\\\\s*\",c:[a,{cN:\"regexp\",c:[e.BE,n],i:/\\n/,v:[{b:\"/\",e:\"/[a-z]*\"},{b:\"%r{\",e:\"}[a-z]*\"},{b:\"%r\\\\(\",e:\"\\\\)[a-z]*\"},{b:\"%r!\",e:\"![a-z]*\"},{b:\"%r\\\\[\",e:\"\\\\][a-z]*\"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var o=\"[>?]>\",l=\"[\\\\w`]+\\\\(\\\\w+\\\\):\\\\d+:\\\\d+>\",u=\"(\\\\w+-)?\\\\d+\\\\.\\\\d+\\\\.\\\\d(p\\\\d+)?[^>]+>\",w=[{b:/^\\s*=>/,starts:{e:\"$\",c:d}},{cN:\"meta\",b:\"^(\"+o+\"|\"+l+\"|\"+u+\")\",starts:{e:\"$\",c:d}}];return{aliases:[\"rb\",\"gemspec\",\"podspec\",\"thor\",\"irb\"],k:c,i:/\\/\\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage(\"javascript\",function(e){return{aliases:[\"js\",\"jsx\"],k:{keyword:\"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as\",literal:\"true false null undefined NaN Infinity\",built_in:\"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise\"},c:[{cN:\"meta\",r:10,b:/^\\s*['\"]use (strict|asm)['\"]/},{cN:\"meta\",b:/^`!/,e:/$/},e.ASM,e.QSM,{cN:\"string\",b:\"`\",e:\"`\",c:[e.BE,{cN:\"subst\",b:\"\\\\$\\\\{\",e:\"\\\\}\"}]},e.CLCM,e.CBCM,{cN:\"number\",v:[{b:\"\\\\b(0[bB][01]+)\"},{b:\"\\\\b(0[oO][0-7]+)\"},{b:e.CNR}],r:0},{b:\"(\"+e.RSR+\"|\\\\b(case|return|throw)\\\\b)\\\\s*\",k:\"return throw case\",c:[e.CLCM,e.CBCM,e.RM,{b:/,e:/(\\/\\w+|\\w+\\/)>/,sL:\"xml\",c:[{b:/<\\w+\\/>/,skip:!0},{b:/<\\w+/,e:/(\\/\\w+|\\w+\\/)>/,skip:!0,c:[\"self\"]}]}],r:0},{cN:\"function\",bK:\"function\",e:/\\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:\"params\",b:/\\(/,e:/\\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\\[|%/},{b:/\\$[(.]/},e.METHOD_GUARD,{cN:\"class\",bK:\"class\",e:/[{;=]/,eE:!0,i:/[:\"\\[\\]]/,c:[{bK:\"extends\"},e.UTM]},{bK:\"constructor\",e:/\\{/,eE:!0}],i:/`(?!!)/}});hljs.registerLanguage(\"java\",function(e){var a=e.UIR+\"(<\"+e.UIR+\"(\\\\s*,\\\\s*\"+e.UIR+\")*>)?\",t=\"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\",r=\"\\\\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:r,r:0};return{aliases:[\"jsp\"],k:t,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:\"(\"+a+\"\\\\s+)+\"+e.UIR+\"\\\\s*\\\\(\",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.UIR+\"\\\\s*\\\\(\",rB:!0,r:0,c:[e.UTM]},{cN:\"params\",b:/\\(/,e:/\\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:\"meta\",b:\"@[A-Za-z]+\"}]}});hljs.registerLanguage(\"python\",function(e){var r={cN:\"meta\",b:/^(>>>|\\.\\.\\.) /},b={cN:\"string\",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?\"\"\"/,e:/\"\"\"/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)\"/,e:/\"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)\"/,e:/\"/},e.ASM,e.QSM]},a={cN:\"number\",r:0,v:[{b:e.BNR+\"[lLjJ]?\"},{b:\"\\\\b(0o[0-7]+)[lLjJ]?\"},{b:e.CNR+\"[lLjJ]?\"}]},l={cN:\"params\",b:/\\(/,e:/\\)/,c:[\"self\",r,a,b]};return{aliases:[\"py\",\"gyp\"],k:{keyword:\"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False\",built_in:\"Ellipsis NotImplemented\"},i:/(<\\/|->|\\?)/,c:[r,a,b,e.HCM,{v:[{cN:\"function\",bK:\"def\",r:10},{cN:\"class\",bK:\"class\"}],e:/:/,i:/[${=;\\n,]/,c:[e.UTM,l,{b:/->/,eW:!0,k:\"None\"}]},{cN:\"meta\",b:/^[\\t ]*@/,e:/$/},{b:/\\b(print|exec)\\(/}]}});hljs.registerLanguage(\"cpp\",function(t){var e={cN:\"keyword\",b:\"\\\\b[a-z\\\\d_]*_t\\\\b\"},r={cN:\"string\",v:[t.inherit(t.QSM,{b:'((u8?|U)|L)?\"'}),{b:'(u8?|U)?R\"',e:'\"',c:[t.BE]},{b:\"'\\\\\\\\?.\",e:\"'\",i:\".\"}]},i={cN:\"number\",v:[{b:\"\\\\b(\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)(u|U|l|L|ul|UL|f|F)\"},{b:t.CNR}],r:0},s={cN:\"meta\",b:\"`\",e:\"$\",k:{\"meta-keyword\":\"if else elif endif define undef warning error line pragma ifdef ifndef\"},c:[{b:/\\\\\\n/,r:0},{bK:\"include\",e:\"$\",k:{\"meta-keyword\":\"include\"},c:[t.inherit(r,{cN:\"meta-string\"}),{cN:\"meta-string\",b:\"<\",e:\">\",i:\"\\\\n\"}]},r,t.CLCM,t.CBCM]},a=t.IR+\"\\\\s*\\\\(\",c={keyword:\"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong\",built_in:\"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr\",literal:\"true false nullptr NULL\"};return{aliases:[\"c\",\"cc\",\"h\",\"c++\",\"h++\",\"hpp\"],k:c,i:\"\",c:[e,t.CLCM,t.CBCM,i,r,s,{b:\"\\\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\\\s*<\",e:\">\",k:c,c:[\"self\",e]},{b:t.IR+\"::\",k:c},{bK:\"new throw return else\",r:0},{cN:\"function\",b:\"(\"+t.IR+\"[\\\\*&\\\\s]+)+\"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\\w\\s\\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:\"params\",b:/\\(/,e:/\\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,i]},t.CLCM,t.CBCM,s]}]}});";
-
-
- final static String CSS_DEFAULT = "/*\n" +
+ static final String CSS_DEFAULT = "/*\n" +
"\n" +
"Original highlight.js style (c) Ivan Sagalaev \n" +
"\n" +
@@ -22,7 +19,7 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background: #F0F0F0;\n" +
+ " background: rgb(240,240,240);\n" +
"}\n" +
"\n" +
"\n" +
@@ -30,11 +27,11 @@ package com.protectsoft.webviewcode;
"\n" +
".hljs,\n" +
".hljs-subst {\n" +
- " color: #444;\n" +
+ " color: rgb(68,68,68);\n" +
"}\n" +
"\n" +
".hljs-comment {\n" +
- " color: #888888;\n" +
+ " color: rgb(136,136,136);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -57,12 +54,12 @@ package com.protectsoft.webviewcode;
".hljs-quote,\n" +
".hljs-template-tag,\n" +
".hljs-deletion {\n" +
- " color: #880000;\n" +
+ " color: rgb(136,0,0);\n" +
"}\n" +
"\n" +
".hljs-title,\n" +
".hljs-section {\n" +
- " color: #880000;\n" +
+ " color: rgb(136,0,0);\n" +
" font-weight: bold;\n" +
"}\n" +
"\n" +
@@ -73,32 +70,32 @@ package com.protectsoft.webviewcode;
".hljs-link,\n" +
".hljs-selector-attr,\n" +
".hljs-selector-pseudo {\n" +
- " color: #BC6060;\n" +
+ " color: rgb(188,96,96);\n" +
"}\n" +
"\n" +
"\n" +
"/* Language color: hue: 90; */\n" +
"\n" +
".hljs-literal {\n" +
- " color: #78A960;\n" +
+ " color: rgb(120,169,96);\n" +
"}\n" +
"\n" +
".hljs-built_in,\n" +
".hljs-bullet,\n" +
".hljs-code,\n" +
".hljs-addition {\n" +
- " color: #397300;\n" +
+ " color: rgb(57,115,0);\n" +
"}\n" +
"\n" +
"\n" +
"/* Meta color: hue: 200 */\n" +
"\n" +
".hljs-meta {\n" +
- " color: #1f7199;\n" +
+ " color: rgb(31,113,153);\n" +
"}\n" +
"\n" +
".hljs-meta-string {\n" +
- " color: #4d99bf;\n" +
+ " color: rgb(77,153,191);\n" +
"}\n" +
"\n" +
"\n" +
@@ -112,21 +109,21 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_AGATE = "/*!\n" +
+ static final String CSS_AGATE = "/*!\n" +
" * Agate by Taufik Nurrohman \n" +
" * ----------------------------------------------------\n" +
" *\n" +
- " * #ade5fc\n" +
- " * #a2fca2\n" +
- " * #c6b4f0\n" +
- " * #d36363\n" +
- " * #fcc28c\n" +
- " * #fc9b9b\n" +
- " * #ffa\n" +
- " * #fff\n" +
- " * #333\n" +
- " * #62c8f3\n" +
- " * #888\n" +
+ " * rgb(173,229,252)\n" +
+ " * rgb(162,252,162)\n" +
+ " * rgb(198,180,240)\n" +
+ " * rgb(211,99,99)\n" +
+ " * rgb(252,194,140)\n" +
+ " * rgb(252,155,155)\n" +
+ " * rgb(255,255,170)\n" +
+ " * rgb(255,255,255)\n" +
+ " * rgb(51,51,51)\n" +
+ " * rgb(98,200,243)\n" +
+ " * rgb(136,136,136)\n" +
" *\n" +
" */\n" +
"\n" +
@@ -134,7 +131,7 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background: #333;\n" +
+ " background: rgb(51,51,51);\n" +
" color: white;\n" +
"}\n" +
"\n" +
@@ -149,19 +146,19 @@ package com.protectsoft.webviewcode;
"}\n" +
"\n" +
".hljs-tag {\n" +
- " color: #62c8f3;\n" +
+ " color: rgb(98,200,243);\n" +
"}\n" +
"\n" +
".hljs-variable,\n" +
".hljs-template-variable,\n" +
".hljs-selector-id,\n" +
".hljs-selector-class {\n" +
- " color: #ade5fc;\n" +
+ " color: rgb(173,229,252);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
".hljs-bullet {\n" +
- " color: #a2fca2;\n" +
+ " color: rgb(162,252,162);\n" +
"}\n" +
"\n" +
".hljs-type,\n" +
@@ -171,44 +168,44 @@ package com.protectsoft.webviewcode;
".hljs-quote,\n" +
".hljs-built_in,\n" +
".hljs-builtin-name {\n" +
- " color: #ffa;\n" +
+ " color: rgb(255,255,170);\n" +
"}\n" +
"\n" +
".hljs-number,\n" +
".hljs-symbol,\n" +
".hljs-bullet {\n" +
- " color: #d36363;\n" +
+ " color: rgb(211,99,99);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
".hljs-selector-tag,\n" +
".hljs-literal {\n" +
- " color: #fcc28c;\n" +
+ " color: rgb(252,194,140);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-deletion,\n" +
".hljs-code {\n" +
- " color: #888;\n" +
+ " color: rgb(136,136,136);\n" +
"}\n" +
"\n" +
".hljs-regexp,\n" +
".hljs-link {\n" +
- " color: #c6b4f0;\n" +
+ " color: rgb(198,180,240);\n" +
"}\n" +
"\n" +
".hljs-meta {\n" +
- " color: #fc9b9b;\n" +
+ " color: rgb(252,155,155);\n" +
"}\n" +
"\n" +
".hljs-deletion {\n" +
- " background-color: #fc9b9b;\n" +
- " color: #333;\n" +
+ " background-color: rgb(252,155,155);\n" +
+ " color: rgb(51,51,51);\n" +
"}\n" +
"\n" +
".hljs-addition {\n" +
- " background-color: #a2fca2;\n" +
- " color: #333;\n" +
+ " background-color: rgb(162,252,162);\n" +
+ " color: rgb(51,51,51);\n" +
"}\n" +
"\n" +
".hljs a {\n" +
@@ -222,14 +219,14 @@ package com.protectsoft.webviewcode;
"}\n";
- final static String CSS_ANDROIDSTUDIO = "/*\n" +
+ static final String CSS_ANDROIDSTUDIO = "/*\n" +
"Date: 24 Fev 2015\n" +
"Author: Pedro Oliveira \n" +
"*/\n" +
"\n" +
".hljs {\n" +
- " color: #a9b7c6;\n" +
- " background: #282b2e;\n" +
+ " color: rgb(169,183,198);\n" +
+ " background: rgb(40,43,46);\n" +
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
@@ -239,46 +236,46 @@ package com.protectsoft.webviewcode;
".hljs-literal,\n" +
".hljs-symbol,\n" +
".hljs-bullet {\n" +
- " color: #6897BB;\n" +
+ " color: rgb(104,151,187);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
".hljs-selector-tag,\n" +
".hljs-deletion {\n" +
- " color: #cc7832;\n" +
+ " color: rgb(204,120,50);\n" +
"}\n" +
"\n" +
".hljs-variable,\n" +
".hljs-template-variable,\n" +
".hljs-link {\n" +
- " color: #629755;\n" +
+ " color: rgb(98,151,85);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #808080;\n" +
+ " color: rgb(128,128,128);\n" +
"}\n" +
"\n" +
".hljs-meta {\n" +
- " color: #bbb529;\n" +
+ " color: rgb(187,181,41);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
".hljs-attribute,\n" +
".hljs-addition {\n" +
- " color: #6A8759;\n" +
+ " color: rgb(106,135,89);\n" +
"}\n" +
"\n" +
".hljs-section,\n" +
".hljs-title,\n" +
".hljs-type {\n" +
- " color: #ffc66d;\n" +
+ " color: rgb(255,198,109);\n" +
"}\n" +
"\n" +
".hljs-name,\n" +
".hljs-selector-id,\n" +
".hljs-selector-class {\n" +
- " color: #e8bf6a;\n" +
+ " color: rgb(232,191,106);\n" +
"}\n" +
"\n" +
".hljs-emphasis {\n" +
@@ -289,7 +286,7 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_ARDUINO = "/*\n" +
+ static final String CSS_ARDUINO = "/*\n" +
"\n" +
"Arduino® Light Theme - Stefania Mellai \n" +
"\n" +
@@ -299,12 +296,12 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background: #FFFFFF;\n" +
+ " background: rgb(255,255,255);\n" +
"}\n" +
"\n" +
".hljs,\n" +
".hljs-subst {\n" +
- " color: #434f54;\n" +
+ " color: rgb(67,79,84);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -312,7 +309,7 @@ package com.protectsoft.webviewcode;
".hljs-selector-tag,\n" +
".hljs-doctag,\n" +
".hljs-name {\n" +
- " color: #00979D;\n" +
+ " color: rgb(0,151,157);\n" +
"}\n" +
"\n" +
".hljs-built_in,\n" +
@@ -320,7 +317,7 @@ package com.protectsoft.webviewcode;
".hljs-bullet,\n" +
".hljs-code,\n" +
".hljs-addition {\n" +
- " color: #D35400;\n" +
+ " color: rgb(211,84,0);\n" +
"}\n" +
"\n" +
".hljs-regexp,\n" +
@@ -330,7 +327,7 @@ package com.protectsoft.webviewcode;
".hljs-link,\n" +
".hljs-selector-attr,\n" +
".hljs-selector-pseudo {\n" +
- " color: #00979D;\n" +
+ " color: rgb(0,151,157);\n" +
"}\n" +
"\n" +
".hljs-type,\n" +
@@ -340,12 +337,12 @@ package com.protectsoft.webviewcode;
".hljs-quote,\n" +
".hljs-template-tag,\n" +
".hljs-deletion {\n" +
- " color: #005C5F;\n" +
+ " color: rgb(0,92,95);\n" +
"}\n" +
"\n" +
".hljs-title,\n" +
".hljs-section {\n" +
- " color: #880000;\n" +
+ " color: rgb(136,0,0);\n" +
" font-weight: bold;\n" +
"}\n" +
"\n" +
@@ -354,12 +351,12 @@ package com.protectsoft.webviewcode;
"}\n" +
"\n" +
".hljs-meta-keyword {\n" +
- " color: #728E00;\n" +
+ " color: rgb(114,142,0);\n" +
"}\n" +
"\n" +
".hljs-meta {\n" +
- " color: #728E00;\n" +
- " color: #434f54;\n" +
+ " color: rgb(114,142,0);\n" +
+ " color: rgb(67,79,84);\n" +
"}\n" +
"\n" +
".hljs-emphasis {\n" +
@@ -371,16 +368,16 @@ package com.protectsoft.webviewcode;
"}\n" +
"\n" +
".hljs-function {\n" +
- " color: #728E00;\n" +
+ " color: rgb(114,142,0);\n" +
"}\n" +
"\n" +
".hljs-number {\n" +
- " color: #8A7B52; \n" +
+ " color: rgb(138,123,82); \n" +
"}\n";
- final static String CSS_ARTA = "/*\n" +
+ static final String CSS_ARTA = "/*\n" +
"Date: 17.V.2011\n" +
"Author: pumbur \n" +
"*/\n" +
@@ -389,34 +386,34 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background: #222;\n" +
+ " background: rgb(34,34,34);\n" +
"}\n" +
"\n" +
".hljs,\n" +
".hljs-subst {\n" +
- " color: #aaa;\n" +
+ " color: rgb(170,170,170);\n" +
"}\n" +
"\n" +
".hljs-section {\n" +
- " color: #fff;\n" +
+ " color: rgb(255,255,255);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote,\n" +
".hljs-meta {\n" +
- " color: #444;\n" +
+ " color: rgb(68,68,68);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
".hljs-symbol,\n" +
".hljs-bullet,\n" +
".hljs-regexp {\n" +
- " color: #ffcc33;\n" +
+ " color: rgb(255,204,51);\n" +
"}\n" +
"\n" +
".hljs-number,\n" +
".hljs-addition {\n" +
- " color: #00cc66;\n" +
+ " color: rgb(0,204,102);\n" +
"}\n" +
"\n" +
".hljs-built_in,\n" +
@@ -426,7 +423,7 @@ package com.protectsoft.webviewcode;
".hljs-template-variable,\n" +
".hljs-attribute,\n" +
".hljs-link {\n" +
- " color: #32aaee;\n" +
+ " color: rgb(50,170,238);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -434,14 +431,14 @@ package com.protectsoft.webviewcode;
".hljs-name,\n" +
".hljs-selector-id,\n" +
".hljs-selector-class {\n" +
- " color: #6644aa;\n" +
+ " color: rgb(102,68,170);\n" +
"}\n" +
"\n" +
".hljs-title,\n" +
".hljs-variable,\n" +
".hljs-deletion,\n" +
".hljs-template-tag {\n" +
- " color: #bb1166;\n" +
+ " color: rgb(187,17,102);\n" +
"}\n" +
"\n" +
".hljs-section,\n" +
@@ -454,7 +451,7 @@ package com.protectsoft.webviewcode;
" font-style: italic;\n" +
"}\n";
- final static String CSS_ASCETIC = "/*\n" +
+ static final String CSS_ASCETIC = "/*\n" +
"\n" +
"Original style from softwaremaniacs.org (c) Ivan Sagalaev \n" +
"\n" +
@@ -477,14 +474,14 @@ package com.protectsoft.webviewcode;
".hljs-addition,\n" +
".hljs-attribute,\n" +
".hljs-link {\n" +
- " color: #888;\n" +
+ " color: rgb(136,136,136);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote,\n" +
".hljs-meta,\n" +
".hljs-deletion {\n" +
- " color: #ccc;\n" +
+ " color: rgb(204,204,204);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -500,14 +497,14 @@ package com.protectsoft.webviewcode;
" font-style: italic;\n" +
"}\n";
- final static String CSS_ATELIER_DARK = "/* Base16 Atelier Cave Dark - Theme */\n" +
+ static final String CSS_ATELIER_DARK = "/* Base16 Atelier Cave Dark - Theme */\n" +
"/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */\n" +
"/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n" +
"\n" +
"/* Atelier-Cave Comment */\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #7e7887;\n" +
+ " color: rgb(126,120,135);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Red */\n" +
@@ -520,7 +517,7 @@ package com.protectsoft.webviewcode;
".hljs-name,\n" +
".hljs-selector-id,\n" +
".hljs-selector-class {\n" +
- " color: #be4678;\n" +
+ " color: rgb(190,70,120);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Orange */\n" +
@@ -531,48 +528,48 @@ package com.protectsoft.webviewcode;
".hljs-literal,\n" +
".hljs-type,\n" +
".hljs-params {\n" +
- " color: #aa573c;\n" +
+ " color: rgb(170,87,60);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Green */\n" +
".hljs-string,\n" +
".hljs-symbol,\n" +
".hljs-bullet {\n" +
- " color: #2a9292;\n" +
+ " color: rgb(42,146,146);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Blue */\n" +
".hljs-title,\n" +
".hljs-section {\n" +
- " color: #576ddb;\n" +
+ " color: rgb(87,109,219);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Purple */\n" +
".hljs-keyword,\n" +
".hljs-selector-tag {\n" +
- " color: #955ae7;\n" +
+ " color: rgb(149,90,231);\n" +
"}\n" +
"\n" +
".hljs-deletion,\n" +
".hljs-addition {\n" +
- " color: #19171c;\n" +
+ " color: rgb(25,23,28);\n" +
" display: inline-block;\n" +
" width: 100%;\n" +
"}\n" +
"\n" +
".hljs-deletion {\n" +
- " background-color: #be4678;\n" +
+ " background-color: rgb(190,70,120);\n" +
"}\n" +
"\n" +
".hljs-addition {\n" +
- " background-color: #2a9292;\n" +
+ " background-color: rgb(42,146,146);\n" +
"}\n" +
"\n" +
".hljs {\n" +
" display: block;\n" +
" overflow-x: auto;\n" +
- " background: #19171c;\n" +
- " color: #8b8792;\n" +
+ " background: rgb(25,23,28);\n" +
+ " color: rgb(139,135,146);\n" +
" padding: 0.5em;\n" +
"}\n" +
"\n" +
@@ -584,14 +581,14 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_ATELIER_LIGHT = "/* Base16 Atelier Cave Light - Theme */\n" +
+ static final String CSS_ATELIER_LIGHT = "/* Base16 Atelier Cave Light - Theme */\n" +
"/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */\n" +
"/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n" +
"\n" +
"/* Atelier-Cave Comment */\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #655f6d;\n" +
+ " color: rgb(101,95,109);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Red */\n" +
@@ -606,7 +603,7 @@ package com.protectsoft.webviewcode;
".hljs-name,\n" +
".hljs-selector-id,\n" +
".hljs-selector-class {\n" +
- " color: #be4678;\n" +
+ " color: rgb(190,70,120);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Orange */\n" +
@@ -617,48 +614,48 @@ package com.protectsoft.webviewcode;
".hljs-literal,\n" +
".hljs-type,\n" +
".hljs-params {\n" +
- " color: #aa573c;\n" +
+ " color: rgb(170,87,60);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Green */\n" +
".hljs-string,\n" +
".hljs-symbol,\n" +
".hljs-bullet {\n" +
- " color: #2a9292;\n" +
+ " color: rgb(42,146,146);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Blue */\n" +
".hljs-title,\n" +
".hljs-section {\n" +
- " color: #576ddb;\n" +
+ " color: rgb(87,109,219);\n" +
"}\n" +
"\n" +
"/* Atelier-Cave Purple */\n" +
".hljs-keyword,\n" +
".hljs-selector-tag {\n" +
- " color: #955ae7;\n" +
+ " color: rgb(149,90,231);\n" +
"}\n" +
"\n" +
".hljs-deletion,\n" +
".hljs-addition {\n" +
- " color: #19171c;\n" +
+ " color: rgb(25,23,28);\n" +
" display: inline-block;\n" +
" width: 100%;\n" +
"}\n" +
"\n" +
".hljs-deletion {\n" +
- " background-color: #be4678;\n" +
+ " background-color: rgb(190,70,120);\n" +
"}\n" +
"\n" +
".hljs-addition {\n" +
- " background-color: #2a9292;\n" +
+ " background-color: rgb(42,146,146);\n" +
"}\n" +
"\n" +
".hljs {\n" +
" display: block;\n" +
" overflow-x: auto;\n" +
- " background: #efecf4;\n" +
- " color: #585260;\n" +
+ " background: rgb(239,236,244);\n" +
+ " color: rgb(88,82,96);\n" +
" padding: 0.5em;\n" +
"}\n" +
"\n" +
@@ -670,14 +667,14 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_ATELIER_FOREST_DARK = "/* Base16 Atelier Forest Dark - Theme */\n" +
+ static final String CSS_ATELIER_FOREST_DARK = "/* Base16 Atelier Forest Dark - Theme */\n" +
"/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */\n" +
"/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n" +
"\n" +
"/* Atelier-Forest Comment */\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #9c9491;\n" +
+ " color: rgb(156,148,145);\n" +
"}\n" +
"\n" +
"/* Atelier-Forest Red */\n" +
@@ -691,7 +688,7 @@ package com.protectsoft.webviewcode;
".hljs-name,\n" +
".hljs-selector-id,\n" +
".hljs-selector-class {\n" +
- " color: #f22c40;\n" +
+ " color: rgb(242,44,64);\n" +
"}\n" +
"\n" +
"/* Atelier-Forest Orange */\n" +
@@ -702,33 +699,33 @@ package com.protectsoft.webviewcode;
".hljs-literal,\n" +
".hljs-type,\n" +
".hljs-params {\n" +
- " color: #df5320;\n" +
+ " color: rgb(223,83,32);\n" +
"}\n" +
"\n" +
"/* Atelier-Forest Green */\n" +
".hljs-string,\n" +
".hljs-symbol,\n" +
".hljs-bullet {\n" +
- " color: #7b9726;\n" +
+ " color: rgb(123,151,38);\n" +
"}\n" +
"\n" +
"/* Atelier-Forest Blue */\n" +
".hljs-title,\n" +
".hljs-section {\n" +
- " color: #407ee7;\n" +
+ " color: rgb(64,126,231);\n" +
"}\n" +
"\n" +
"/* Atelier-Forest Purple */\n" +
".hljs-keyword,\n" +
".hljs-selector-tag {\n" +
- " color: #6666ea;\n" +
+ " color: rgb(102,102,234);\n" +
"}\n" +
"\n" +
".hljs {\n" +
" display: block;\n" +
" overflow-x: auto;\n" +
- " background: #1b1918;\n" +
- " color: #a8a19f;\n" +
+ " background: rgb(27,25,24);\n" +
+ " color: rgb(168,161,159);\n" +
" padding: 0.5em;\n" +
"}\n" +
"\n" +
@@ -740,7 +737,7 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_DARKSTYLE = "/*\n" +
+ static final String CSS_DARKSTYLE = "/*\n" +
"\n" +
"Dark style from softwaremaniacs.org (c) Ivan Sagalaev \n" +
"\n" +
@@ -750,7 +747,7 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background: #444;\n" +
+ " background: rgb(68,68,68);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -763,7 +760,7 @@ package com.protectsoft.webviewcode;
"\n" +
".hljs,\n" +
".hljs-subst {\n" +
- " color: #ddd;\n" +
+ " color: rgb(221,221,221);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
@@ -778,14 +775,14 @@ package com.protectsoft.webviewcode;
".hljs-variable,\n" +
".hljs-template-tag,\n" +
".hljs-template-variable {\n" +
- " color: #d88;\n" +
+ " color: rgb(221,136,136);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote,\n" +
".hljs-deletion,\n" +
".hljs-meta {\n" +
- " color: #777;\n" +
+ " color: rgb(119,119,119);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -807,7 +804,7 @@ package com.protectsoft.webviewcode;
- final static String CSS_DARKULA = "/*\n" +
+ static final String CSS_DARKULA = "/*\n" +
"\n" +
"Darkula color scheme from the JetBrains family of IDEs\n" +
"\n" +
@@ -818,16 +815,16 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background: #2b2b2b;\n" +
+ " background: rgb(43,43,43);\n" +
"}\n" +
"\n" +
".hljs {\n" +
- " color: #bababa;\n" +
+ " color: rgb(186,186,186);\n" +
"}\n" +
"\n" +
".hljs-strong,\n" +
".hljs-emphasis {\n" +
- " color: #a8a8a2;\n" +
+ " color: rgb(168,168,162);\n" +
"}\n" +
"\n" +
".hljs-bullet,\n" +
@@ -836,12 +833,12 @@ package com.protectsoft.webviewcode;
".hljs-number,\n" +
".hljs-regexp,\n" +
".hljs-literal {\n" +
- " color: #6896ba;\n" +
+ " color: rgb(104,150,186);\n" +
"}\n" +
"\n" +
".hljs-code,\n" +
".hljs-selector-class {\n" +
- " color: #a6e22e;\n" +
+ " color: rgb(166,226,46);\n" +
"}\n" +
"\n" +
".hljs-emphasis {\n" +
@@ -854,11 +851,11 @@ package com.protectsoft.webviewcode;
".hljs-attribute,\n" +
".hljs-name,\n" +
".hljs-variable {\n" +
- " color: #cb7832;\n" +
+ " color: rgb(203,120,50);\n" +
"}\n" +
"\n" +
".hljs-params {\n" +
- " color: #b9b9b9;\n" +
+ " color: rgb(185,185,185);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
@@ -873,17 +870,17 @@ package com.protectsoft.webviewcode;
".hljs-template-tag,\n" +
".hljs-template-variable,\n" +
".hljs-addition {\n" +
- " color: #e0c46c;\n" +
+ " color: rgb(224,196,108);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-deletion,\n" +
".hljs-meta {\n" +
- " color: #7f7f7f;\n" +
+ " color: rgb(127,127,127);\n" +
"}\n";
- final static String CSS_DOCCO = "/*\n" +
+ static final String CSS_DOCCO = "/*\n" +
"Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)\n" +
"*/\n" +
"\n" +
@@ -891,13 +888,13 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " color: #000;\n" +
- " background: #f8f8ff;\n" +
+ " color: rgb(0,0,0);\n" +
+ " background: rgb(248,248,255);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #408080;\n" +
+ " color: rgb(64,128,128);\n" +
" font-style: italic;\n" +
"}\n" +
"\n" +
@@ -905,72 +902,72 @@ package com.protectsoft.webviewcode;
".hljs-selector-tag,\n" +
".hljs-literal,\n" +
".hljs-subst {\n" +
- " color: #954121;\n" +
+ " color: rgb(149,65,33);\n" +
"}\n" +
"\n" +
".hljs-number {\n" +
- " color: #40a070;\n" +
+ " color: rgb(64,160,112);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
".hljs-doctag {\n" +
- " color: #219161;\n" +
+ " color: rgb(33,145,97);\n" +
"}\n" +
"\n" +
".hljs-selector-id,\n" +
".hljs-selector-class,\n" +
".hljs-section,\n" +
".hljs-type {\n" +
- " color: #19469d;\n" +
+ " color: rgb(25,70,157);\n" +
"}\n" +
"\n" +
".hljs-params {\n" +
- " color: #00f;\n" +
+ " color: rgb(0,0,255);\n" +
"}\n" +
"\n" +
".hljs-title {\n" +
- " color: #458;\n" +
+ " color: rgb(68,85,136);\n" +
" font-weight: bold;\n" +
"}\n" +
"\n" +
".hljs-tag,\n" +
".hljs-name,\n" +
".hljs-attribute {\n" +
- " color: #000080;\n" +
+ " color: rgb(0,0,128);\n" +
" font-weight: normal;\n" +
"}\n" +
"\n" +
".hljs-variable,\n" +
".hljs-template-variable {\n" +
- " color: #008080;\n" +
+ " color: rgb(0,128,128);\n" +
"}\n" +
"\n" +
".hljs-regexp,\n" +
".hljs-link {\n" +
- " color: #b68;\n" +
+ " color: rgb(187,102,136);\n" +
"}\n" +
"\n" +
".hljs-symbol,\n" +
".hljs-bullet {\n" +
- " color: #990073;\n" +
+ " color: rgb(153,0,115);\n" +
"}\n" +
"\n" +
".hljs-built_in,\n" +
".hljs-builtin-name {\n" +
- " color: #0086b3;\n" +
+ " color: rgb(0,134,179);\n" +
"}\n" +
"\n" +
".hljs-meta {\n" +
- " color: #999;\n" +
+ " color: rgb(153,153,153);\n" +
" font-weight: bold;\n" +
"}\n" +
"\n" +
".hljs-deletion {\n" +
- " background: #fdd;\n" +
+ " background: rgb(255,221,221);\n" +
"}\n" +
"\n" +
".hljs-addition {\n" +
- " background: #dfd;\n" +
+ " background: rgb(221,255,221);\n" +
"}\n" +
"\n" +
".hljs-emphasis {\n" +
@@ -981,7 +978,7 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_FAR = "/*\n" +
+ static final String CSS_FAR = "/*\n" +
"\n" +
"FAR Style (c) MajestiC \n" +
"\n" +
@@ -991,12 +988,12 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background: #000080;\n" +
+ " background: rgb(0,0,128);\n" +
"}\n" +
"\n" +
".hljs,\n" +
".hljs-subst {\n" +
- " color: #0ff;\n" +
+ " color: rgb(0,255,255);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
@@ -1008,7 +1005,7 @@ package com.protectsoft.webviewcode;
".hljs-template-tag,\n" +
".hljs-template-variable,\n" +
".hljs-addition {\n" +
- " color: #ff0;\n" +
+ " color: rgb(255,255,0);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -1019,25 +1016,25 @@ package com.protectsoft.webviewcode;
".hljs-selector-id,\n" +
".hljs-selector-class,\n" +
".hljs-variable {\n" +
- " color: #fff;\n" +
+ " color: rgb(255,255,255);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote,\n" +
".hljs-doctag,\n" +
".hljs-deletion {\n" +
- " color: #888;\n" +
+ " color: rgb(136,136,136);\n" +
"}\n" +
"\n" +
".hljs-number,\n" +
".hljs-regexp,\n" +
".hljs-literal,\n" +
".hljs-link {\n" +
- " color: #0f0;\n" +
+ " color: rgb(0,255,0);\n" +
"}\n" +
"\n" +
".hljs-meta {\n" +
- " color: #008080;\n" +
+ " color: rgb(0,128,128);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -1053,7 +1050,7 @@ package com.protectsoft.webviewcode;
" font-style: italic;\n" +
"}\n";
- final static String CSS_GITHUB = "/*\n" +
+ static final String CSS_GITHUB = "/*\n" +
"\n" +
"github.com style (c) Vasily Polovnyov \n" +
"\n" +
@@ -1063,20 +1060,20 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " color: #333;\n" +
- " background: #f8f8f8;\n" +
+ " color: rgb(51,51,51);\n" +
+ " background: rgb(248,248,248);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #998;\n" +
+ " color: rgb(153,153,136);\n" +
" font-style: italic;\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
".hljs-selector-tag,\n" +
".hljs-subst {\n" +
- " color: #333;\n" +
+ " color: rgb(51,51,51);\n" +
" font-weight: bold;\n" +
"}\n" +
"\n" +
@@ -1085,18 +1082,18 @@ package com.protectsoft.webviewcode;
".hljs-variable,\n" +
".hljs-template-variable,\n" +
".hljs-tag .hljs-attr {\n" +
- " color: #008080;\n" +
+ " color: rgb(0,128,128);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
".hljs-doctag {\n" +
- " color: #d14;\n" +
+ " color: rgb(221,17,68);\n" +
"}\n" +
"\n" +
".hljs-title,\n" +
".hljs-section,\n" +
".hljs-selector-id {\n" +
- " color: #900;\n" +
+ " color: rgb(153,0,0);\n" +
" font-weight: bold;\n" +
"}\n" +
"\n" +
@@ -1106,43 +1103,43 @@ package com.protectsoft.webviewcode;
"\n" +
".hljs-type,\n" +
".hljs-class .hljs-title {\n" +
- " color: #458;\n" +
+ " color: rgb(68,85,136);\n" +
" font-weight: bold;\n" +
"}\n" +
"\n" +
".hljs-tag,\n" +
".hljs-name,\n" +
".hljs-attribute {\n" +
- " color: #000080;\n" +
+ " color: rgb(0,0,128);\n" +
" font-weight: normal;\n" +
"}\n" +
"\n" +
".hljs-regexp,\n" +
".hljs-link {\n" +
- " color: #009926;\n" +
+ " color: rgb(0,153,38);\n" +
"}\n" +
"\n" +
".hljs-symbol,\n" +
".hljs-bullet {\n" +
- " color: #990073;\n" +
+ " color: rgb(153,0,115);\n" +
"}\n" +
"\n" +
".hljs-built_in,\n" +
".hljs-builtin-name {\n" +
- " color: #0086b3;\n" +
+ " color: rgb(0,134,179);\n" +
"}\n" +
"\n" +
".hljs-meta {\n" +
- " color: #999;\n" +
+ " color: rgb(153,153,153);\n" +
" font-weight: bold;\n" +
"}\n" +
"\n" +
".hljs-deletion {\n" +
- " background: #fdd;\n" +
+ " background: rgb(255,221,221);\n" +
"}\n" +
"\n" +
".hljs-addition {\n" +
- " background: #dfd;\n" +
+ " background: rgb(221,255,221);\n" +
"}\n" +
"\n" +
".hljs-emphasis {\n" +
@@ -1153,7 +1150,7 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_GIHUBGIST = "/**\n" +
+ static final String CSS_GIHUBGIST = "/**\n" +
" * GitHub Gist Theme\n" +
" * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro\n" +
" */\n" +
@@ -1162,13 +1159,13 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" background: white;\n" +
" padding: 0.5em;\n" +
- " color: #333333;\n" +
+ " color: rgb(51,51,51);\n" +
" overflow-x: auto;\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-meta {\n" +
- " color: #969896;\n" +
+ " color: rgb(150,152,150);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
@@ -1177,29 +1174,29 @@ package com.protectsoft.webviewcode;
".hljs-strong,\n" +
".hljs-emphasis,\n" +
".hljs-quote {\n" +
- " color: #df5000;\n" +
+ " color: rgb(223,80,0);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
".hljs-selector-tag,\n" +
".hljs-type {\n" +
- " color: #a71d5d;\n" +
+ " color: rgb(167,29,93);\n" +
"}\n" +
"\n" +
".hljs-literal,\n" +
".hljs-symbol,\n" +
".hljs-bullet,\n" +
".hljs-attribute {\n" +
- " color: #0086b3;\n" +
+ " color: rgb(0,134,179);\n" +
"}\n" +
"\n" +
".hljs-section,\n" +
".hljs-name {\n" +
- " color: #63a35c;\n" +
+ " color: rgb(99,163,92);\n" +
"}\n" +
"\n" +
".hljs-tag {\n" +
- " color: #333333;\n" +
+ " color: rgb(51,51,51);\n" +
"}\n" +
"\n" +
".hljs-title,\n" +
@@ -1208,24 +1205,24 @@ package com.protectsoft.webviewcode;
".hljs-selector-class,\n" +
".hljs-selector-attr,\n" +
".hljs-selector-pseudo {\n" +
- " color: #795da3;\n" +
+ " color: rgb(121,93,163);\n" +
"}\n" +
"\n" +
".hljs-addition {\n" +
- " color: #55a532;\n" +
- " background-color: #eaffea;\n" +
+ " color: rgb(85,165,50);\n" +
+ " background-color: rgb(234,255,234);\n" +
"}\n" +
"\n" +
".hljs-deletion {\n" +
- " color: #bd2c00;\n" +
- " background-color: #ffecec;\n" +
+ " color: rgb(189,44,0);\n" +
+ " background-color: rgb(255,236,236);\n" +
"}\n" +
"\n" +
".hljs-link {\n" +
" text-decoration: underline;\n" +
"}\n";
- final static String CSS_GOOGLECODE = "/*\n" +
+ static final String CSS_GOOGLECODE = "/*\n" +
"\n" +
"Google Code style (c) Aahan Krish \n" +
"\n" +
@@ -1241,7 +1238,7 @@ package com.protectsoft.webviewcode;
"\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #800;\n" +
+ " color: rgb(136,0,0);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -1249,19 +1246,19 @@ package com.protectsoft.webviewcode;
".hljs-section,\n" +
".hljs-title,\n" +
".hljs-name {\n" +
- " color: #008;\n" +
+ " color: rgb(0,0,136);\n" +
"}\n" +
"\n" +
".hljs-variable,\n" +
".hljs-template-variable {\n" +
- " color: #660;\n" +
+ " color: rgb(102,102,0);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
".hljs-selector-attr,\n" +
".hljs-selector-pseudo,\n" +
".hljs-regexp {\n" +
- " color: #080;\n" +
+ " color: rgb(0,136,0);\n" +
"}\n" +
"\n" +
".hljs-literal,\n" +
@@ -1270,7 +1267,7 @@ package com.protectsoft.webviewcode;
".hljs-meta,\n" +
".hljs-number,\n" +
".hljs-link {\n" +
- " color: #066;\n" +
+ " color: rgb(0,102,102);\n" +
"}\n" +
"\n" +
".hljs-title,\n" +
@@ -1280,30 +1277,30 @@ package com.protectsoft.webviewcode;
".hljs-built_in,\n" +
".hljs-builtin-name,\n" +
".hljs-params {\n" +
- " color: #606;\n" +
+ " color: rgb(102,0,102);\n" +
"}\n" +
"\n" +
".hljs-attribute,\n" +
".hljs-subst {\n" +
- " color: #000;\n" +
+ " color: rgb(0,0,0);\n" +
"}\n" +
"\n" +
".hljs-formula {\n" +
- " background-color: #eee;\n" +
+ " background-color: rgb(238,238,238);\n" +
" font-style: italic;\n" +
"}\n" +
"\n" +
".hljs-selector-id,\n" +
".hljs-selector-class {\n" +
- " color: #9B703F\n" +
+ " color: rgb(155,112,63)\n" +
"}\n" +
"\n" +
".hljs-addition {\n" +
- " background-color: #baeeba;\n" +
+ " background-color: rgb(186,238,186);\n" +
"}\n" +
"\n" +
".hljs-deletion {\n" +
- " background-color: #ffc8bd;\n" +
+ " background-color: rgb(255,200,189);\n" +
"}\n" +
"\n" +
".hljs-doctag,\n" +
@@ -1315,7 +1312,7 @@ package com.protectsoft.webviewcode;
" font-style: italic;\n" +
"}\n";
- final static String CSS_IDEA = "/*\n" +
+ static final String CSS_IDEA = "/*\n" +
"\n" +
"Intellij Idea-like styling (c) Vasily Polovnyov \n" +
"\n" +
@@ -1325,28 +1322,28 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " color: #000;\n" +
- " background: #fff;\n" +
+ " color: rgb(0,0,0);\n" +
+ " background: rgb(255,255,255);\n" +
"}\n" +
"\n" +
".hljs-subst,\n" +
".hljs-title {\n" +
" font-weight: normal;\n" +
- " color: #000;\n" +
+ " color: rgb(0,0,0);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #808080;\n" +
+ " color: rgb(128,128,128);\n" +
" font-style: italic;\n" +
"}\n" +
"\n" +
".hljs-meta {\n" +
- " color: #808000;\n" +
+ " color: rgb(128,128,0);\n" +
"}\n" +
"\n" +
".hljs-tag {\n" +
- " background: #efefef;\n" +
+ " background: rgb(239,239,239);\n" +
"}\n" +
"\n" +
".hljs-section,\n" +
@@ -1358,7 +1355,7 @@ package com.protectsoft.webviewcode;
".hljs-selector-id,\n" +
".hljs-selector-class {\n" +
" font-weight: bold;\n" +
- " color: #000080;\n" +
+ " color: rgb(0,0,128);\n" +
"}\n" +
"\n" +
".hljs-attribute,\n" +
@@ -1366,7 +1363,7 @@ package com.protectsoft.webviewcode;
".hljs-regexp,\n" +
".hljs-link {\n" +
" font-weight: bold;\n" +
- " color: #0000ff;\n" +
+ " color: rgb(0,0,255);\n" +
"}\n" +
"\n" +
".hljs-number,\n" +
@@ -1376,15 +1373,15 @@ package com.protectsoft.webviewcode;
"}\n" +
"\n" +
".hljs-string {\n" +
- " color: #008000;\n" +
+ " color: rgb(0,128,0);\n" +
" font-weight: bold;\n" +
"}\n" +
"\n" +
".hljs-symbol,\n" +
".hljs-bullet,\n" +
".hljs-formula {\n" +
- " color: #000;\n" +
- " background: #d0eded;\n" +
+ " color: rgb(0,0,0);\n" +
+ " background: rgb(208,237,237);\n" +
" font-style: italic;\n" +
"}\n" +
"\n" +
@@ -1394,15 +1391,15 @@ package com.protectsoft.webviewcode;
"\n" +
".hljs-variable,\n" +
".hljs-template-variable {\n" +
- " color: #660e7a;\n" +
+ " color: rgb(102,14,122);\n" +
"}\n" +
"\n" +
".hljs-addition {\n" +
- " background: #baeeba;\n" +
+ " background: rgb(186,238,186);\n" +
"}\n" +
"\n" +
".hljs-deletion {\n" +
- " background: #ffc8bd;\n" +
+ " background: rgb(255,200,189);\n" +
"}\n" +
"\n" +
".hljs-emphasis {\n" +
@@ -1413,7 +1410,7 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_MAGULA = "/*\n" +
+ static final String CSS_MAGULA = "/*\n" +
"Description: Magula style for highligh.js\n" +
"Author: Ruslan Keba \n" +
"Website: http://rukeba.com/\n" +
@@ -1426,7 +1423,7 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background-color: #f4f4f4;\n" +
+ " background-color: rgb(244,244,244);\n" +
"}\n" +
"\n" +
".hljs,\n" +
@@ -1443,12 +1440,12 @@ package com.protectsoft.webviewcode;
".hljs-variable,\n" +
".hljs-template-tag,\n" +
".hljs-template-variable {\n" +
- " color: #050;\n" +
+ " color: rgb(0,85,0);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #777;\n" +
+ " color: rgb(119,119,119);\n" +
"}\n" +
"\n" +
".hljs-number,\n" +
@@ -1456,12 +1453,12 @@ package com.protectsoft.webviewcode;
".hljs-literal,\n" +
".hljs-type,\n" +
".hljs-link {\n" +
- " color: #800;\n" +
+ " color: rgb(136,0,0);\n" +
"}\n" +
"\n" +
".hljs-deletion,\n" +
".hljs-meta {\n" +
- " color: #00e;\n" +
+ " color: rgb(0,0,238);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -1484,7 +1481,7 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_OBSIDIAN = "/**\n" +
+ static final String CSS_OBSIDIAN = "/**\n" +
" * Obsidian style\n" +
" * ported by Alexander Marenin (http://github.com/ioncreature)\n" +
" */\n" +
@@ -1493,26 +1490,26 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background: #282b2e;\n" +
+ " background: rgb(40,43,46);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
".hljs-selector-tag,\n" +
".hljs-literal,\n" +
".hljs-selector-id {\n" +
- " color: #93c763;\n" +
+ " color: rgb(147,199,99);\n" +
"}\n" +
"\n" +
".hljs-number {\n" +
- " color: #ffcd22;\n" +
+ " color: rgb(255,205,34);\n" +
"}\n" +
"\n" +
".hljs {\n" +
- " color: #e0e2e4;\n" +
+ " color: rgb(224,226,228);\n" +
"}\n" +
"\n" +
".hljs-attribute {\n" +
- " color: #668bb0;\n" +
+ " color: rgb(102,139,176);\n" +
"}\n" +
"\n" +
".hljs-code,\n" +
@@ -1523,11 +1520,11 @@ package com.protectsoft.webviewcode;
"\n" +
".hljs-regexp,\n" +
".hljs-link {\n" +
- " color: #d39745;\n" +
+ " color: rgb(211,151,69);\n" +
"}\n" +
"\n" +
".hljs-meta {\n" +
- " color: #557182;\n" +
+ " color: rgb(85,113,130);\n" +
"}\n" +
"\n" +
".hljs-tag,\n" +
@@ -1543,22 +1540,22 @@ package com.protectsoft.webviewcode;
".hljs-variable,\n" +
".hljs-template-tag,\n" +
".hljs-template-variable {\n" +
- " color: #8cbbad;\n" +
+ " color: rgb(140,187,173);\n" +
"}\n" +
"\n" +
".hljs-string,\n" +
".hljs-symbol {\n" +
- " color: #ec7600;\n" +
+ " color: rgb(236,118,0);\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote,\n" +
".hljs-deletion {\n" +
- " color: #818e96;\n" +
+ " color: rgb(129,142,150);\n" +
"}\n" +
"\n" +
".hljs-selector-class {\n" +
- " color: #A082BD\n" +
+ " color: rgb(160,130,189)\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
@@ -1573,7 +1570,7 @@ package com.protectsoft.webviewcode;
" font-weight: bold;\n" +
"}\n";
- final static String CSS_XCODE = "/*\n" +
+ static final String CSS_XCODE = "/*\n" +
"\n" +
"XCode style (c) Angel Garcia \n" +
"\n" +
@@ -1583,37 +1580,37 @@ package com.protectsoft.webviewcode;
" display: block;\n" +
" overflow-x: auto;\n" +
" padding: 0.5em;\n" +
- " background: #fff;\n" +
+ " background: rgb(255,255,255);\n" +
" color: black;\n" +
"}\n" +
"\n" +
".hljs-comment,\n" +
".hljs-quote {\n" +
- " color: #006a00;\n" +
+ " color: rgb(0,106,0);\n" +
"}\n" +
"\n" +
".hljs-keyword,\n" +
".hljs-selector-tag,\n" +
".hljs-literal {\n" +
- " color: #aa0d91;\n" +
+ " color: rgb(170,13,145);\n" +
"}\n" +
"\n" +
".hljs-name {\n" +
- " color: #008;\n" +
+ " color: rgb(0,0,136);\n" +
"}\n" +
"\n" +
".hljs-variable,\n" +
".hljs-template-variable {\n" +
- " color: #660;\n" +
+ " color: rgb(102,102,0);\n" +
"}\n" +
"\n" +
".hljs-string {\n" +
- " color: #c41a16;\n" +
+ " color: rgb(196,26,22);\n" +
"}\n" +
"\n" +
".hljs-regexp,\n" +
".hljs-link {\n" +
- " color: #080;\n" +
+ " color: rgb(0,136,0);\n" +
"}\n" +
"\n" +
".hljs-title,\n" +
@@ -1622,7 +1619,7 @@ package com.protectsoft.webviewcode;
".hljs-bullet,\n" +
".hljs-number,\n" +
".hljs-meta {\n" +
- " color: #1c00cf;\n" +
+ " color: rgb(28,0,207);\n" +
"}\n" +
"\n" +
".hljs-section,\n" +
@@ -1632,30 +1629,30 @@ package com.protectsoft.webviewcode;
".hljs-built_in,\n" +
".hljs-builtin-name,\n" +
".hljs-params {\n" +
- " color: #5c2699;\n" +
+ " color: rgb(92,38,153);\n" +
"}\n" +
"\n" +
".hljs-attribute,\n" +
".hljs-subst {\n" +
- " color: #000;\n" +
+ " color: rgb(0,0,0);\n" +
"}\n" +
"\n" +
".hljs-formula {\n" +
- " background-color: #eee;\n" +
+ " background-color: rgb(238,238,238);\n" +
" font-style: italic;\n" +
"}\n" +
"\n" +
".hljs-addition {\n" +
- " background-color: #baeeba;\n" +
+ " background-color: rgb(186,238,186);\n" +
"}\n" +
"\n" +
".hljs-deletion {\n" +
- " background-color: #ffc8bd;\n" +
+ " background-color: rgb(255,200,189);\n" +
"}\n" +
"\n" +
".hljs-selector-id,\n" +
".hljs-selector-class {\n" +
- " color: #9b703f;\n" +
+ " color: rgb(55,112,63);\n" +
"}\n" +
"\n" +
".hljs-doctag,\n" +
@@ -1666,6 +1663,4 @@ package com.protectsoft.webviewcode;
".hljs-emphasis {\n" +
" font-style: italic;\n" +
"}\n";
-
-
}
diff --git a/src/main/java/com/protectsoft/webviewcode/HtmlCode.java b/library/src/main/java/com/protectsoft/webviewcode/HtmlCode.java
similarity index 48%
rename from src/main/java/com/protectsoft/webviewcode/HtmlCode.java
rename to library/src/main/java/com/protectsoft/webviewcode/HtmlCode.java
index c71a769bc15840f540ea1e1c7bd41262ea3aa2da..8e71cc56cf2d4be932dbb4348ffadaf942737fc8 100644
--- a/src/main/java/com/protectsoft/webviewcode/HtmlCode.java
+++ b/library/src/main/java/com/protectsoft/webviewcode/HtmlCode.java
@@ -1,37 +1,28 @@
package com.protectsoft.webviewcode;
/**
+ * HtmlCode
*
+ * @since 2021-04-30
*/
- class HtmlCode {
-
-
+class HtmlCode {
static final String HTML_HEAD = "";
-
static final String HTML_HEAD_END = "";
-
static final String HTML_BODY_END = "";
-
-
- static final String STYLE_TEXT_WRAP = "\"\n";
-
+ static final String STYLE_TEXT_WRAP = "\"\n";
static final String HTML_PRE_TEXT_START = "";
static final String HTML_PRE_TEXT_END = "
\n";
-
static final String HTML_PRE_CODE_START = "";
static final String HTML_PRE_CODE_END = "
\n";
-
-
-
}
diff --git a/library/src/main/java/com/protectsoft/webviewcode/Settings.java b/library/src/main/java/com/protectsoft/webviewcode/Settings.java
new file mode 100644
index 0000000000000000000000000000000000000000..1655b092226c58f8bd83947ef547b562e5c78866
--- /dev/null
+++ b/library/src/main/java/com/protectsoft/webviewcode/Settings.java
@@ -0,0 +1,180 @@
+package com.protectsoft.webviewcode;
+
+/**
+ * Settings
+ *
+ * @since 2021-04-30
+ */
+public final class Settings {
+ // avoid instantiation
+ private Settings() {
+ }
+
+ /**
+ * Lang
+ *
+ * @since 2021-04-30
+ */
+ public final class Lang {
+ /**
+ * JAVA
+ */
+ public static final String JAVA = "java";
+ /**
+ * PYTHON
+ */
+ public static final String PYTHON = "python";
+ /**
+ * JAVASCRIPT
+ */
+ public static final String JAVASCRIPT = "javascript";
+ /**
+ * RUBY
+ */
+ public static final String RUBY = "ruby";
+ /**
+ * CSHARP
+ */
+ public static final String CSHARP = "cs";
+ /**
+ * PHP
+ */
+ public static final String PHP = "php";
+ /**
+ * SQL
+ */
+ public static final String SQL = "sql";
+ /**
+ * CPLUSPLUS
+ */
+ public static final String CPLUSPLUS = "c++";
+ }
+
+ /**
+ * WithStyle
+ *
+ * @since 2021-04-30
+ */
+ public final class WithStyle {
+ /**
+ * DEFAULT
+ */
+ public static final String DEFAULT = HighlightLib.CSS_DEFAULT;
+ /**
+ * AGATE
+ */
+ public static final String AGATE = HighlightLib.CSS_AGATE;
+ /**
+ * ANDROIDSTUDIO
+ */
+ public static final String ANDROIDSTUDIO = HighlightLib.CSS_ANDROIDSTUDIO;
+ /**
+ * ARDUINO_LIGHT
+ */
+ public static final String ARDUINO_LIGHT = HighlightLib.CSS_ARDUINO;
+ /**
+ * ARTA
+ */
+ public static final String ARTA = HighlightLib.CSS_ARTA;
+ /**
+ * ASCETIC
+ */
+ public static final String ASCETIC = HighlightLib.CSS_ASCETIC;
+ /**
+ * ATELIER_DARK
+ */
+ public static final String ATELIER_DARK = HighlightLib.CSS_ATELIER_DARK;
+ /**
+ * ATELIER_LIGHT
+ */
+ public static final String ATELIER_LIGHT = HighlightLib.CSS_ATELIER_LIGHT;
+ /**
+ * ATELIER_FOREST_DARK
+ */
+ public static final String ATELIER_FOREST_DARK = HighlightLib.CSS_ATELIER_FOREST_DARK;
+ /**
+ * DARKSTYLE
+ */
+ public static final String DARKSTYLE = HighlightLib.CSS_DARKSTYLE;
+ /**
+ * DARKULA
+ */
+ public static final String DARKULA = HighlightLib.CSS_DARKULA;
+ /**
+ * DOCCO
+ */
+ public static final String DOCCO = HighlightLib.CSS_DOCCO;
+ /**
+ * FAR
+ */
+ public static final String FAR = HighlightLib.CSS_FAR;
+ /**
+ * GITHUB
+ */
+ public static final String GITHUB = HighlightLib.CSS_GITHUB;
+ /**
+ * GITHUBGIST
+ */
+ public static final String GITHUBGIST = HighlightLib.CSS_GIHUBGIST;
+ /**
+ * GOOGLECODE
+ */
+ public static final String GOOGLECODE = HighlightLib.CSS_GOOGLECODE;
+ /**
+ * IDEA
+ */
+ public static final String IDEA = HighlightLib.CSS_IDEA;
+ /**
+ * MAGULA
+ */
+ public static final String MAGULA = HighlightLib.CSS_MAGULA;
+ /**
+ * OBSIDIAN
+ */
+ public static final String OBSIDIAN = HighlightLib.CSS_OBSIDIAN;
+ /**
+ * XCODE
+ */
+ public static final String XCODE = HighlightLib.CSS_XCODE;
+ }
+
+ /**
+ * not implemented yet
+ *
+ * @since 2021-04-30
+ */
+ public final class MimeType {
+ /**
+ * TEXT_HTML
+ */
+ public static final String TEXT_HTML = "text/html";
+ /**
+ * TEXT_PLAIN
+ */
+ public static final String TEXT_PLAIN = "text/plain";
+ }
+
+ /**
+ * not implemented yet
+ *
+ * @since 2021-04-30
+ */
+ public final class Charset {
+ /**
+ * UTF_8
+ */
+ public static final String UTF_8 = "utf-8";
+ }
+
+ /**
+ * not implemented yet
+ *
+ * @since 2021-04-30
+ */
+ public final class TextWrap {
+ /**
+ * PRE_WRAP
+ */
+ public static final String PRE_WRAP = "pre-wrap";
+ }
+}
diff --git a/library/src/main/resources/base/element/string.json b/library/src/main/resources/base/element/string.json
new file mode 100644
index 0000000000000000000000000000000000000000..1e2b219ccdd1183e23968586e5e2e404b41c38c9
--- /dev/null
+++ b/library/src/main/resources/base/element/string.json
@@ -0,0 +1,8 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "library"
+ }
+ ]
+}
diff --git a/library/src/test/java/com/protectsoft/webviewcode/ExampleTest.java b/library/src/test/java/com/protectsoft/webviewcode/ExampleTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..864f8742e79c5ff43dc5b7016f13c64af0fce2f6
--- /dev/null
+++ b/library/src/test/java/com/protectsoft/webviewcode/ExampleTest.java
@@ -0,0 +1,9 @@
+package com.protectsoft.webviewcode;
+
+import org.junit.Test;
+
+public class ExampleTest {
+ @Test
+ public void onStart() {
+ }
+}
diff --git a/readmepics/pic1.png b/readmepics/pic1.png
deleted file mode 100644
index d2b059c173ed0f6cf84b6b0235a273d69b235e6c..0000000000000000000000000000000000000000
Binary files a/readmepics/pic1.png and /dev/null differ
diff --git a/readmepics/pic2.png b/readmepics/pic2.png
deleted file mode 100644
index e4ba4e419ef77302058873cfe1535e8ddbd7b18d..0000000000000000000000000000000000000000
Binary files a/readmepics/pic2.png and /dev/null differ
diff --git a/readmepics/pic3.png b/readmepics/pic3.png
deleted file mode 100644
index 8d41958e18c3883ebe71f67ec0a1bddbd102014a..0000000000000000000000000000000000000000
Binary files a/readmepics/pic3.png and /dev/null differ
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..d0c7ee8440156d4a9324ac5357770747425fef57
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':entry', ':library'
diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml
deleted file mode 100644
index ba3030a4f2281f506a49d3aec1481c98eda68300..0000000000000000000000000000000000000000
--- a/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
diff --git a/src/main/java/com/protectsoft/webviewcode/Settings.java b/src/main/java/com/protectsoft/webviewcode/Settings.java
deleted file mode 100644
index 39b91f7d084c84dccb5bd720a93849fdb052baf9..0000000000000000000000000000000000000000
--- a/src/main/java/com/protectsoft/webviewcode/Settings.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package com.protectsoft.webviewcode;
-
-/**
- *
- */
-public final class Settings {
-
- //avoid instantiation
- private Settings() {
- }
-
- public final class Lang {
-
- public static final String JAVA = "java";
- public static final String PYTHON = "python";
- public static final String JAVASCRIPT = "javascript";
- public static final String RUBY = "ruby";
- public static final String CSHARP = "c#";
- public static final String PHP = "php";
- public static final String SQL = "sql";
- public static final String CPLUSPLUS = "c++";
-
- }
-
- public final class WithStyle {
-
- public static final String DEFAULT = HighlightLib.CSS_DEFAULT;
- public static final String AGATE = HighlightLib.CSS_AGATE;
- public static final String ANDROIDSTUDIO = HighlightLib.CSS_ANDROIDSTUDIO;
- public static final String ARDUINO_LIGHT = HighlightLib.CSS_ARDUINO;
- public static final String ARTA = HighlightLib.CSS_ARTA;
- public static final String ASCETIC = HighlightLib.CSS_ASCETIC;
- public static final String ATELIER_DARK = HighlightLib.CSS_ATELIER_DARK;
- public static final String ATELIER_LIGHT = HighlightLib.CSS_ATELIER_LIGHT;
- public static final String ATELIER_FOREST_DARK = HighlightLib.CSS_ATELIER_FOREST_DARK;
- public static final String DARKSTYLE = HighlightLib.CSS_DARKSTYLE;
- public static final String DARKULA = HighlightLib.CSS_DARKULA;
- public static final String DOCCO = HighlightLib.CSS_DOCCO;
- public static final String FAR = HighlightLib.CSS_FAR;
- public static final String GITHUB = HighlightLib.CSS_GITHUB;
- public static final String GITHUBGIST = HighlightLib.CSS_GIHUBGIST;
- public static final String GOOGLECODE = HighlightLib.CSS_GOOGLECODE;
- public static final String IDEA = HighlightLib.CSS_IDEA;
- public static final String MAGULA = HighlightLib.CSS_MAGULA;
- public static final String OBSIDIAN = HighlightLib.CSS_OBSIDIAN;
- public static final String XCODE = HighlightLib.CSS_XCODE;
-
- }
-
-
- //not implemented yet
- public final class MimeType {
-
- public static final String TEXT_HTML = "text/html";
- public static final String TEXT_PLAIN = "text/plain";
-
- }
-
- //not implemented yet
- public final class Charset {
-
- public static final String UTF_8 = "utf-8";
-
- }
-
- //not implemented yet
- public final class TextWrap {
-
- public static final String PRE_WRAP = "pre-wrap";
-
- }
-
-}
diff --git a/src/test/java/com/protectsoft/webviewcode/CodeviewTest.java b/src/test/java/com/protectsoft/webviewcode/CodeviewTest.java
deleted file mode 100644
index 592aed9c0e137380423f5a0ff497595efec6eaf2..0000000000000000000000000000000000000000
--- a/src/test/java/com/protectsoft/webviewcode/CodeviewTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.protectsoft.webviewcode;
-
-import android.content.Context;
-import android.webkit.WebView;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-
-import java.lang.reflect.Field;
-import java.util.List;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static org.mockito.MockitoAnnotations.initMocks;
-
-/**
- *
- */
-public class CodeviewTest {
-
- Codeview codeview;
-
- WebView webView;
-
- @Mock
- Context context;
-
-
- @Before
- public void setUp() {
- initMocks(this);
-
- context = Mockito.mock(Context.class);
- //context = new MockContext();
- assertNotNull(context);
- codeview = new Codeview(context);
- }
-
-
- @Test
- public void with() {
- Codeview.with(context);
- }
-
-
- @Test(expected = IllegalArgumentException.class)
- public void testInto() {
- Codeview.with(context)
- .into(webView);
- }
-
-
- @Test
- public void testGetAllCodeStyles() {
- List fields = Codeview.getAllCodeStyles();
- Field[] fields1 = Settings.WithStyle.class.getFields();
- assertEquals(fields.size(), fields1.length);
- for(Field f : fields1) {
- boolean expected = true;
- assertEquals(expected,fields.contains(f.getName()));
- }
- }
-
-
- @Test
- public void testGetAllLanguages() {
- List fields = Codeview.getAllLanguages();
- Field[] fields1 = Settings.Lang.class.getFields();
- assertEquals(fields.size(), fields1.length);
- for(Field f : fields1) {
- boolean expected = true;
- assertEquals(expected,fields.contains(f.getName()));
- }
- }
-
-
-}