├── .gitignore ├── Images ├── atom-one-dark.png ├── far.png └── github-gist.png ├── LICENCE.md ├── Package.swift ├── README.md ├── Sources ├── Assets │ ├── LICENCE │ ├── highlight.min.js │ └── styles │ │ ├── a11y-dark.css │ │ ├── a11y-light.css │ │ ├── agate.css │ │ ├── an-old-hope.css │ │ ├── androidstudio.css │ │ ├── arduino-light.css │ │ ├── arta.css │ │ ├── ascetic.css │ │ ├── atelier-cave-dark.css │ │ ├── atelier-cave-light.css │ │ ├── atelier-dune-dark.css │ │ ├── atelier-dune-light.css │ │ ├── atelier-estuary-dark.css │ │ ├── atelier-estuary-light.css │ │ ├── atelier-forest-dark.css │ │ ├── atelier-forest-light.css │ │ ├── atelier-heath-dark.css │ │ ├── atelier-heath-light.css │ │ ├── atelier-lakeside-dark.css │ │ ├── atelier-lakeside-light.css │ │ ├── atelier-plateau-dark.css │ │ ├── atelier-plateau-light.css │ │ ├── atelier-savanna-dark.css │ │ ├── atelier-savanna-light.css │ │ ├── atelier-seaside-dark.css │ │ ├── atelier-seaside-light.css │ │ ├── atelier-sulphurpool-dark.css │ │ ├── atelier-sulphurpool-light.css │ │ ├── atom-one-dark-reasonable.css │ │ ├── atom-one-dark.css │ │ ├── atom-one-light.css │ │ ├── brown-paper.css │ │ ├── codepen-embed.css │ │ ├── color-brewer.css │ │ ├── darcula.css │ │ ├── dark.css │ │ ├── default.css │ │ ├── docco.css │ │ ├── dracula.css │ │ ├── far.css │ │ ├── foundation.css │ │ ├── github-dark.css │ │ ├── github-gist.css │ │ ├── github.css │ │ ├── gml.css │ │ ├── googlecode.css │ │ ├── gradient-dark.css │ │ ├── gradient-light.css │ │ ├── grayscale.css │ │ ├── gruvbox-dark.css │ │ ├── gruvbox-light.css │ │ ├── hopscotch.css │ │ ├── hybrid.css │ │ ├── idea.css │ │ ├── ir-black.css │ │ ├── isbl-editor-dark.css │ │ ├── isbl-editor-light.css │ │ ├── kimbie-dark.css │ │ ├── kimbie-light.css │ │ ├── lightfair.css │ │ ├── lioshi.css │ │ ├── magula.css │ │ ├── mono-blue.css │ │ ├── monokai-sublime.css │ │ ├── monokai.css │ │ ├── night-owl.css │ │ ├── nnfx-dark.css │ │ ├── nnfx-light.css │ │ ├── nord.css │ │ ├── obsidian.css │ │ ├── ocean.css │ │ ├── paraiso-dark.css │ │ ├── paraiso-light.css │ │ ├── pojoaque.css │ │ ├── purebasic.css │ │ ├── qtcreator_dark.css │ │ ├── qtcreator_light.css │ │ ├── railscasts.css │ │ ├── rainbow.css │ │ ├── routeros.css │ │ ├── school-book.css │ │ ├── shades-of-purple.css │ │ ├── silk-dark.css │ │ ├── silk-light.css │ │ ├── snazzy.css │ │ ├── solarized-dark.css │ │ ├── solarized-light.css │ │ ├── srcery.css │ │ ├── stackoverflow-dark.css │ │ ├── stackoverflow-light.css │ │ ├── sunburst.css │ │ ├── tomorrow-night-blue.css │ │ ├── tomorrow-night-bright.css │ │ ├── tomorrow-night-eighties.css │ │ ├── tomorrow-night.css │ │ ├── tomorrow.css │ │ ├── vs.css │ │ ├── vs2015.css │ │ ├── vulcan.css │ │ ├── xcode-dusk.css │ │ ├── xcode.css │ │ ├── xt256.css │ │ └── zenburn.css └── Highlighter │ ├── HTMLUtils.swift │ ├── Highlighter.swift │ ├── Shims.swift │ └── Theme.swift ├── Tests └── HighlighterTests │ └── HighlighterTests.swift └── hs.xcworkspace ├── contents.xcworkspacedata └── xcshareddata └── IDEWorkspaceChecks.plist /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | 92 | .swiftpm/ 93 | -------------------------------------------------------------------------------- /Images/atom-one-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smittytone/HighlighterSwift/7faedca3fe85b807848f8ac9729427a1abcf8a90/Images/atom-one-dark.png -------------------------------------------------------------------------------- /Images/far.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smittytone/HighlighterSwift/7faedca3fe85b807848f8ac9729427a1abcf8a90/Images/far.png -------------------------------------------------------------------------------- /Images/github-gist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smittytone/HighlighterSwift/7faedca3fe85b807848f8ac9729427a1abcf8a90/Images/github-gist.png -------------------------------------------------------------------------------- /LICENCE.md: -------------------------------------------------------------------------------- 1 | # HighighterSwift 2 | 3 | Copyright © 2024, Tony Smith (@smittytone) — [MIT Licence](#mid-licence) 4 | Portions copyright © 2016, Juan Pablo Illanes — [MIT Licence](#mid-licence) 5 | Portions copyright © 2006-24, Josh Goebel and Other Contributors — [BSD 3-Clause Licence](#bsd-3-clause-licence) 6 | 7 | --- 8 | 9 | ### MIT Licence 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 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. 16 | 17 | --- 18 | 19 | ### BSD 3-Clause Licence 20 | 21 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 22 | 23 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 24 | 25 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 26 | 27 | * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 28 | 29 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "Highlighter", 8 | platforms: [ 9 | .macOS(.v10_14), 10 | .iOS(.v12), 11 | ], 12 | products: [ 13 | .library( 14 | name: "Highlighter", 15 | targets: ["Highlighter"]) 16 | ], 17 | dependencies: [ 18 | // None 19 | ], 20 | targets: [ 21 | .target( 22 | name: "Highlighter", 23 | dependencies: [], 24 | path: "Sources", 25 | exclude: ["Assets/LICENCE"], 26 | resources: [ 27 | .copy("Assets/highlight.min.js"), 28 | .copy("Assets/styles/a11y-dark.css"), 29 | .copy("Assets/styles/a11y-light.css"), 30 | .copy("Assets/styles/agate.css"), 31 | .copy("Assets/styles/an-old-hope.css"), 32 | .copy("Assets/styles/androidstudio.css"), 33 | .copy("Assets/styles/arduino-light.css"), 34 | .copy("Assets/styles/arta.css"), 35 | .copy("Assets/styles/ascetic.css"), 36 | .copy("Assets/styles/atelier-cave-dark.css"), 37 | .copy("Assets/styles/atelier-cave-light.css"), 38 | .copy("Assets/styles/atelier-dune-dark.css"), 39 | .copy("Assets/styles/atelier-dune-light.css"), 40 | .copy("Assets/styles/atelier-estuary-dark.css"), 41 | .copy("Assets/styles/atelier-estuary-light.css"), 42 | .copy("Assets/styles/atelier-forest-dark.css"), 43 | .copy("Assets/styles/atelier-forest-light.css"), 44 | .copy("Assets/styles/atelier-heath-dark.css"), 45 | .copy("Assets/styles/atelier-heath-light.css"), 46 | .copy("Assets/styles/atelier-lakeside-dark.css"), 47 | .copy("Assets/styles/atelier-lakeside-light.css"), 48 | .copy("Assets/styles/atelier-plateau-dark.css"), 49 | .copy("Assets/styles/atelier-plateau-light.css"), 50 | .copy("Assets/styles/atelier-savanna-dark.css"), 51 | .copy("Assets/styles/atelier-savanna-light.css"), 52 | .copy("Assets/styles/atelier-seaside-dark.css"), 53 | .copy("Assets/styles/atelier-seaside-light.css"), 54 | .copy("Assets/styles/atelier-sulphurpool-dark.css"), 55 | .copy("Assets/styles/atelier-sulphurpool-light.css"), 56 | .copy("Assets/styles/atom-one-dark-reasonable.css"), 57 | .copy("Assets/styles/atom-one-dark.css"), 58 | .copy("Assets/styles/atom-one-light.css"), 59 | .copy("Assets/styles/brown-paper.css"), 60 | .copy("Assets/styles/codepen-embed.css"), 61 | .copy("Assets/styles/color-brewer.css"), 62 | .copy("Assets/styles/darcula.css"), 63 | .copy("Assets/styles/dark.css"), 64 | .copy("Assets/styles/default.css"), 65 | .copy("Assets/styles/docco.css"), 66 | .copy("Assets/styles/dracula.css"), 67 | .copy("Assets/styles/far.css"), 68 | .copy("Assets/styles/foundation.css"), 69 | .copy("Assets/styles/github-dark.css"), 70 | .copy("Assets/styles/github-gist.css"), 71 | .copy("Assets/styles/github.css"), 72 | .copy("Assets/styles/gml.css"), 73 | .copy("Assets/styles/googlecode.css"), 74 | .copy("Assets/styles/gradient-light.css"), 75 | .copy("Assets/styles/gradient-dark.css"), 76 | .copy("Assets/styles/grayscale.css"), 77 | .copy("Assets/styles/gruvbox-dark.css"), 78 | .copy("Assets/styles/gruvbox-light.css"), 79 | .copy("Assets/styles/hopscotch.css"), 80 | .copy("Assets/styles/hybrid.css"), 81 | .copy("Assets/styles/idea.css"), 82 | .copy("Assets/styles/ir-black.css"), 83 | .copy("Assets/styles/isbl-editor-dark.css"), 84 | .copy("Assets/styles/isbl-editor-light.css"), 85 | .copy("Assets/styles/kimbie-dark.css"), 86 | .copy("Assets/styles/kimbie-light.css"), 87 | .copy("Assets/styles/lightfair.css"), 88 | .copy("Assets/styles/lioshi.css"), 89 | .copy("Assets/styles/magula.css"), 90 | .copy("Assets/styles/mono-blue.css"), 91 | .copy("Assets/styles/monokai-sublime.css"), 92 | .copy("Assets/styles/monokai.css"), 93 | .copy("Assets/styles/night-owl.css"), 94 | .copy("Assets/styles/nnfx-light.css"), 95 | .copy("Assets/styles/nnfx-dark.css"), 96 | .copy("Assets/styles/nord.css"), 97 | .copy("Assets/styles/obsidian.css"), 98 | .copy("Assets/styles/ocean.css"), 99 | .copy("Assets/styles/paraiso-dark.css"), 100 | .copy("Assets/styles/paraiso-light.css"), 101 | .copy("Assets/styles/pojoaque.css"), 102 | .copy("Assets/styles/purebasic.css"), 103 | .copy("Assets/styles/qtcreator_dark.css"), 104 | .copy("Assets/styles/qtcreator_light.css"), 105 | .copy("Assets/styles/railscasts.css"), 106 | .copy("Assets/styles/rainbow.css"), 107 | .copy("Assets/styles/routeros.css"), 108 | .copy("Assets/styles/school-book.css"), 109 | .copy("Assets/styles/shades-of-purple.css"), 110 | .copy("Assets/styles/solarized-dark.css"), 111 | .copy("Assets/styles/solarized-light.css"), 112 | .copy("Assets/styles/srcery.css"), 113 | .copy("Assets/styles/stackoverflow-light.css"), 114 | .copy("Assets/styles/stackoverflow-dark.css"), 115 | .copy("Assets/styles/sunburst.css"), 116 | .copy("Assets/styles/tomorrow-night-blue.css"), 117 | .copy("Assets/styles/tomorrow-night-bright.css"), 118 | .copy("Assets/styles/tomorrow-night-eighties.css"), 119 | .copy("Assets/styles/tomorrow-night.css"), 120 | .copy("Assets/styles/tomorrow.css"), 121 | .copy("Assets/styles/vs.css"), 122 | .copy("Assets/styles/vs2015.css"), 123 | .copy("Assets/styles/xcode.css"), 124 | .copy("Assets/styles/xcode-dusk.css"), 125 | .copy("Assets/styles/xt256.css"), 126 | .copy("Assets/styles/zenburn.css"), 127 | .copy("Assets/styles/snazzy.css"), 128 | .copy("Assets/styles/silk-light.css"), 129 | .copy("Assets/styles/silk-dark.css"), 130 | .copy("Assets/styles/vulcan.css") 131 | ]), 132 | .testTarget( 133 | name: "HighlighterTests", 134 | dependencies: ["Highlighter"]) 135 | ] 136 | ) 137 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HighlighterSwift 1.1.6 2 | 3 | This library provides a Swift wrapper for the popular [Highlight.js](https://highlightjs.org/) code highlighting utility. 4 | 5 | ![Far theme example](Images/atom-one-dark.png) 6 | 7 | It is a more up-to-date version of Juan Pablo Illanes’ [Highlightr](https://github.com/raspu/Highlightr) and relies heavily upon code from that project, which is unfortunately no longer fully maintained. 8 | 9 | ### Improvements and Changes 10 | 11 | *Highlightr* makes use of *Highlight.js 9.13.4*, but the most recent release of the JavaScript library is 11.9.0. This is the version used by **HighlighterSwift**. Earlier versions of *Highlight.js* are not considered secure. 12 | 13 | **HighlighterSwift** adds support for alpha values in CSS colours, eg. `#808080AA`, not present in Highlightr. 14 | 15 | Unlike *Highlightr*, **HighlighterSwift** parses *Highlight.js* themes for separate declarations of the same style. For example, *Hybrid* contains the following CSS: 16 | 17 | ```css 18 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#1d1f21}.hljs span::selection,.hljs::selection{background:#373b41}.hljs{color:#c5c8c6} 19 | ``` 20 | 21 | The `hljs.color` attribute is added to `hljs.display`, `hljs.overflow-x`, `hljs.padding` and `hljs.background`, it doesn’t replace them. 22 | 23 | **HighlighterSwift** was designed from the ground up as a Swift Package. Support for legacy package managers is not included. *Highlightr* supports CocoaPods and Carthage. 24 | 25 | **HighlighterSwift** is more deeply commented and the code is presented in a more consistent style. 26 | 27 | A number of functions have been given extra parameters, primarily to add font selection when setting themes and initiating *Theme* objects. Redundant code has been removed. Some parameters have been renamed. 28 | 29 | Unit tests have been added, and more will come, I hope. 30 | 31 | ![Far theme example](Images/far.png) 32 | 33 | #### Why not update Highlightr? 34 | 35 | **HighlighterSwift** was created to meet the needs of a specific project, which was originally conceived with a modified version *Hightlightr* in mind. Some of the changes listed above are breaking, and so I feel it’s not appropriate to just inflict them on the *Hightlightr* source, especially when there are many outstanding pull requests yet to be addressed. But I’m not opposed to pulling in my changes if the community requests that. 36 | 37 | **HighlighterSwift** is released under the same [licence](#licence) as *Highlightr*, allowing developers to select either, both or a mix of the two. 38 | 39 | ## Platform Support 40 | 41 | **HighlighterSwift** supports macOS 10.14 and up, and iOS 12 and up. iOS support is untested, however. 42 | 43 | ## Installation 44 | 45 | To add **HighlighterSwift** to your project, use Xcode to add it as a Swift Package at this repo’s URL. The library contains the *Highlight.js* code and themes. 46 | 47 | **Note** This project was begun to support another, so some themes have been modified slightly to meet the needs of that other project. For example, background images have been removed from the Brown Paper, Greyscale, Schoolbook and Pojoacque themes (*Highlight.js* is also starting to do this); the two Kimbies have been renamed for consistency; colours have been formalised as hex values. 48 | 49 | ## Usage 50 | 51 | Instantiate a *Highlighter* object. Its `init()` function returns an optional, which will be `nil` if the `Highlight.min.js` file could not be found or is non-functional, or the `Default` theme CSS file is missing: 52 | 53 | ```swift 54 | if let highlighter: Highlighter = Highlighter.init() { 55 | ... 56 | } 57 | ``` 58 | 59 | You can set a specific theme using the `setTheme()` function: 60 | 61 | ```swift 62 | highlighter.setTheme("atom-one-light") 63 | ``` 64 | 65 | You can apply your chosen font at this time too rather than fall back on the default, 14pt Courier: 66 | 67 | ```swift 68 | highlighter.setTheme("atom-one-light", withFont: "Menlo-Regular", ofSize: 16.0) 69 | ``` 70 | 71 | From 1.1.3, you can also specify a line spacing value: 72 | 73 | ```swift 74 | highlighter.theme.lineSpacing = (self.lineSpacing - 1.0) * self.fontSize 75 | ``` 76 | 77 | and/or a paragraph spacing value: 78 | 79 | ```swift 80 | highlighter.theme.paraSpacing = 1.0 81 | ``` 82 | 83 | A value of zero for `lineSpacing` is equivalent to single spacing. `paraSpacing` is the space in points added at the end of the paragraph — use `0.0` for no additional spacing (the default). 84 | 85 | Both values must be non-negative. Negative values be replaced with default valyes: `0.0` in both cases. 86 | 87 | **Note** These new values are applied to the instance’s `theme` property. 88 | 89 | You can set or change your preferred font later by using `setCodeFont()`, which takes an *NSFont* or *UIFont* instance configured for the font and text size you want, and is called on the *Highlighter* instance’s `theme` property: 90 | 91 | ```swift 92 | let font: NSFont = NSFont.init(name: "Menlo-Regular", size: 12.0)! 93 | highlighter.theme.setCodeFont(font) 94 | ``` 95 | 96 | Finally, get an optional *NSAttributedString* containing the formatted code: 97 | 98 | ```swift 99 | if let displayString: NSAttributedString = highlighter.highlight(codeString, as: "swift") { 100 | myTextView.textStorage!.addAttributedString(displayString) 101 | } 102 | ``` 103 | 104 | ![Far theme example](Images/github-gist.png) 105 | 106 | The second parameter is the name of language you’re rendering. If you leave out this parameter, or pass `nil`, *Highlighter* will use *Highlight.js*’ language detection feature. 107 | 108 | You can get a list of supported languages by the name they are known to *Highlight.js* by calling `supportedLanguages()` — it returns an array of strings. 109 | 110 | The function `availableThemes()` returns a list of the installed themes. 111 | 112 | ## Release Notes 113 | 114 | - 1.1.6 *30 August 2024* 115 | - Update to the latest version of Highlight.js 11.9.0. 116 | - 1.1.5 *29 April 2024* 117 | - Add dark GitHub theme. 118 | - 1.1.4 *10 November 2023* 119 | - Update to Highlight.js 11.9.0. 120 | - Fix: add missing iOS-oriented import (thanks [@greggreg](https://github.com/gregggreg)) 121 | - 1.1.3 *16 May 2023* 122 | - Add line and paragraph spacing controls. 123 | - 1.1.2 *15 March 2023* 124 | - Include missing languages. 125 | - 1.1.1 *14 March 2023* 126 | - Update to Highlight.js 11.7.0. 127 | - 1.1.0 *26 April 2022* 128 | - Update to Highlight.js 11.5.0. 129 | - Include all Highlight.js languages. 130 | - 1.0.1 *23 July 2021* 131 | - Correct list of available themes in `package.swift`. 132 | - 1.0.0 *15 July 2021* 133 | - Initial public release. 134 | 135 | ## Licences 136 | 137 | **HighlighterSwift**, like *Highlightr* before it, is released under the terms of the MIT Licence. *Hightlight.js* is released under the BSD 3-Clause Licence. 138 | 139 | **HighlighterSwift** is © 2024, Tony Smith. Portions are © 2016, Juan Pablo Illanes. Other portions are © 2006-2024, Josh Goebel and other contributors. 140 | -------------------------------------------------------------------------------- /Sources/Assets/LICENCE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause Licence 2 | 3 | Copyright (c) 2006-2024 Josh Goebel and other contributors. 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /Sources/Assets/styles/a11y-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:#FFD700}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs{display:block;overflow-x:auto;background:#2b2b2b;color:#f8f8f2;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}} -------------------------------------------------------------------------------- /Sources/Assets/styles/a11y-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#696969}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#d91e18}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#aa5d00}.hljs-attribute{color:#aa5d00}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#008000}.hljs-section,.hljs-title{color:#007faa}.hljs-keyword,.hljs-selector-tag{color:#7928a1}.hljs{display:block;overflow-x:auto;background:#fefefe;color:#545454;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast:active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}} -------------------------------------------------------------------------------- /Sources/Assets/styles/agate.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Agate by Taufik Nurrohman 3 | * --------------------------------------------------------------- 4 | * 5 | * #ade5fc 6 | * #a2fca2 7 | * #c6b4f0 8 | * #d36363 9 | * #fcc28c 10 | * #fc9b9b 11 | * #ffa 12 | * #fff 13 | * #333 14 | * #62c8f3 15 | * #888 16 | * 17 | */.hljs{display:block;overflow-x:auto;padding:.5em;background:#333;color:#fff}.hljs-name,.hljs-strong{font-weight:700}.hljs-code,.hljs-emphasis{font-style:italic}.hljs-tag{color:#62c8f3}.hljs-selector-class,.hljs-selector-id,.hljs-template-variable,.hljs-variable{color:#ade5fc}.hljs-bullet,.hljs-string{color:#a2fca2}.hljs-attribute,.hljs-built_in,.hljs-builtin-name,.hljs-quote,.hljs-section,.hljs-title,.hljs-type{color:#ffa}.hljs-bullet,.hljs-number,.hljs-symbol{color:#d36363}.hljs-keyword,.hljs-literal,.hljs-selector-tag{color:#fcc28c}.hljs-code,.hljs-comment,.hljs-deletion{color:#888}.hljs-link,.hljs-regexp{color:#c6b4f0}.hljs-meta{color:#fc9b9b}.hljs-deletion{background-color:#fc9b9b;color:#333}.hljs-addition{background-color:#a2fca2;color:#333}.hljs a{color:inherit}.hljs a:focus,.hljs a:hover{color:inherit;text-decoration:underline} -------------------------------------------------------------------------------- /Sources/Assets/styles/an-old-hope.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#b6b18b}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#eb3c54}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#e7ce56}.hljs-attribute{color:#ee7c2b}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#4fb4d7}.hljs-section,.hljs-title{color:#78bb65}.hljs-keyword,.hljs-selector-tag{color:#b45ea4}.hljs{display:block;overflow-x:auto;background:#1c1d21;color:#c0c5ce;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/androidstudio.css: -------------------------------------------------------------------------------- 1 | .hljs{color:#a9b7c6;background:#282b2e;display:block;overflow-x:auto;padding:.5em}.hljs-bullet,.hljs-literal,.hljs-number,.hljs-symbol{color:#6897bb}.hljs-deletion,.hljs-keyword,.hljs-selector-tag{color:#cc7832}.hljs-link,.hljs-template-variable,.hljs-variable{color:#629755}.hljs-comment,.hljs-quote{color:#808080}.hljs-meta{color:#bbb529}.hljs-addition,.hljs-attribute,.hljs-string{color:#6a8759}.hljs-section,.hljs-title,.hljs-type{color:#ffc66d}.hljs-name,.hljs-selector-class,.hljs-selector-id{color:#e8bf6a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/arduino-light.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff}.hljs,.hljs-subst{color:#434f54}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-name,.hljs-selector-tag{color:#00979d}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code,.hljs-literal{color:#d35400}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#00979d}.hljs-deletion,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#005c5f}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-comment{color:#95A5A6CC}.hljs-meta-keyword{color:#728e00}.hljs-meta{color:#434f54}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-function{color:#728e00}.hljs-number{color:#8a7b52} -------------------------------------------------------------------------------- /Sources/Assets/styles/arta.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#222}.hljs,.hljs-subst{color:#aaa}.hljs-section{color:#fff}.hljs-comment,.hljs-meta,.hljs-quote{color:#444}.hljs-bullet,.hljs-regexp,.hljs-string,.hljs-symbol{color:#fc3}.hljs-addition,.hljs-number{color:#0c6}.hljs-attribute,.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-template-variable,.hljs-type{color:#32aaee}.hljs-keyword,.hljs-name,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag{color:#64a}.hljs-deletion,.hljs-template-tag,.hljs-title,.hljs-variable{color:#b16}.hljs-doctag,.hljs-section,.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.hljs-addition,.hljs-attribute,.hljs-bullet,.hljs-link,.hljs-section,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#888}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#ccc}.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-type{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-cave-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#7e7887}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#be4678}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#aa573c}.hljs-bullet,.hljs-string,.hljs-symbol{color:#2a9292}.hljs-section,.hljs-title{color:#576ddb}.hljs-keyword,.hljs-selector-tag{color:#955ae7}.hljs-addition,.hljs-deletion{color:#19171c;display:inline-block;width:100%}.hljs-deletion{background-color:#be4678}.hljs-addition{background-color:#2a9292}.hljs{display:block;overflow-x:auto;background:#19171c;color:#8b8792;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-cave-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#655f6d}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#be4678}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#aa573c}.hljs-bullet,.hljs-string,.hljs-symbol{color:#2a9292}.hljs-section,.hljs-title{color:#576ddb}.hljs-keyword,.hljs-selector-tag{color:#955ae7}.hljs-addition,.hljs-deletion{color:#19171c;display:inline-block;width:100%}.hljs-deletion{background-color:#be4678}.hljs-addition{background-color:#2a9292}.hljs{display:block;overflow-x:auto;background:#efecf4;color:#585260;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-dune-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#999580}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#d73737}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#b65611}.hljs-bullet,.hljs-string,.hljs-symbol{color:#60ac39}.hljs-section,.hljs-title{color:#6684e1}.hljs-keyword,.hljs-selector-tag{color:#b854d4}.hljs{display:block;overflow-x:auto;background:#20201d;color:#a6a28c;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-dune-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#7d7a68}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#d73737}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#b65611}.hljs-bullet,.hljs-string,.hljs-symbol{color:#60ac39}.hljs-section,.hljs-title{color:#6684e1}.hljs-keyword,.hljs-selector-tag{color:#b854d4}.hljs{display:block;overflow-x:auto;background:#fefbec;color:#6e6b5e;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-estuary-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#878573}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ba6236}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#ae7313}.hljs-bullet,.hljs-string,.hljs-symbol{color:#7d9726}.hljs-section,.hljs-title{color:#36a166}.hljs-keyword,.hljs-selector-tag{color:#5f9182}.hljs-addition,.hljs-deletion{color:#22221b;display:inline-block;width:100%}.hljs-deletion{background-color:#ba6236}.hljs-addition{background-color:#7d9726}.hljs{display:block;overflow-x:auto;background:#22221b;color:#929181;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-estuary-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#6c6b5a}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ba6236}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#ae7313}.hljs-bullet,.hljs-string,.hljs-symbol{color:#7d9726}.hljs-section,.hljs-title{color:#36a166}.hljs-keyword,.hljs-selector-tag{color:#5f9182}.hljs-addition,.hljs-deletion{color:#22221b;display:inline-block;width:100%}.hljs-deletion{background-color:#ba6236}.hljs-addition{background-color:#7d9726}.hljs{display:block;overflow-x:auto;background:#f4f3ec;color:#5f5e4e;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-forest-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#9c9491}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#f22c40}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#df5320}.hljs-bullet,.hljs-string,.hljs-symbol{color:#7b9726}.hljs-section,.hljs-title{color:#407ee7}.hljs-keyword,.hljs-selector-tag{color:#6666ea}.hljs{display:block;overflow-x:auto;background:#1b1918;color:#a8a19f;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-forest-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#766e6b}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#f22c40}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#df5320}.hljs-bullet,.hljs-string,.hljs-symbol{color:#7b9726}.hljs-section,.hljs-title{color:#407ee7}.hljs-keyword,.hljs-selector-tag{color:#6666ea}.hljs{display:block;overflow-x:auto;background:#f1efee;color:#68615e;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-heath-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#9e8f9e}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ca402b}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#a65926}.hljs-bullet,.hljs-string,.hljs-symbol{color:#918b3b}.hljs-section,.hljs-title{color:#516aec}.hljs-keyword,.hljs-selector-tag{color:#7b59c0}.hljs{display:block;overflow-x:auto;background:#1b181b;color:#ab9bab;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-heath-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#776977}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ca402b}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#a65926}.hljs-bullet,.hljs-string,.hljs-symbol{color:#918b3b}.hljs-section,.hljs-title{color:#516aec}.hljs-keyword,.hljs-selector-tag{color:#7b59c0}.hljs{display:block;overflow-x:auto;background:#f7f3f7;color:#695d69;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-lakeside-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#7195a8}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#d22d72}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#935c25}.hljs-bullet,.hljs-string,.hljs-symbol{color:#568c3b}.hljs-section,.hljs-title{color:#257fad}.hljs-keyword,.hljs-selector-tag{color:#6b6bb8}.hljs{display:block;overflow-x:auto;background:#161b1d;color:#7ea2b4;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-lakeside-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#5a7b8c}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#d22d72}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#935c25}.hljs-bullet,.hljs-string,.hljs-symbol{color:#568c3b}.hljs-section,.hljs-title{color:#257fad}.hljs-keyword,.hljs-selector-tag{color:#6b6bb8}.hljs{display:block;overflow-x:auto;background:#ebf8ff;color:#516d7b;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-plateau-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#7e7777}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ca4949}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#b45a3c}.hljs-bullet,.hljs-string,.hljs-symbol{color:#4b8b8b}.hljs-section,.hljs-title{color:#7272ca}.hljs-keyword,.hljs-selector-tag{color:#8464c4}.hljs-addition,.hljs-deletion{color:#1b1818;display:inline-block;width:100%}.hljs-deletion{background-color:#ca4949}.hljs-addition{background-color:#4b8b8b}.hljs{display:block;overflow-x:auto;background:#1b1818;color:#8a8585;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-plateau-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#655d5d}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ca4949}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#b45a3c}.hljs-bullet,.hljs-string,.hljs-symbol{color:#4b8b8b}.hljs-section,.hljs-title{color:#7272ca}.hljs-keyword,.hljs-selector-tag{color:#8464c4}.hljs-addition,.hljs-deletion{color:#1b1818;display:inline-block;width:100%}.hljs-deletion{background-color:#ca4949}.hljs-addition{background-color:#4b8b8b}.hljs{display:block;overflow-x:auto;background:#f4ecec;color:#585050;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-savanna-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#78877d}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#b16139}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#9f713c}.hljs-bullet,.hljs-string,.hljs-symbol{color:#489963}.hljs-section,.hljs-title{color:#478c90}.hljs-keyword,.hljs-selector-tag{color:#55859b}.hljs-addition,.hljs-deletion{color:#171c19;display:inline-block;width:100%}.hljs-deletion{background-color:#b16139}.hljs-addition{background-color:#489963}.hljs{display:block;overflow-x:auto;background:#171c19;color:#87928a;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-savanna-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#5f6d64}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#b16139}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#9f713c}.hljs-bullet,.hljs-string,.hljs-symbol{color:#489963}.hljs-section,.hljs-title{color:#478c90}.hljs-keyword,.hljs-selector-tag{color:#55859b}.hljs-addition,.hljs-deletion{color:#171c19;display:inline-block;width:100%}.hljs-deletion{background-color:#b16139}.hljs-addition{background-color:#489963}.hljs{display:block;overflow-x:auto;background:#ecf4ee;color:#526057;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-seaside-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#809980}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#e6193c}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#87711d}.hljs-bullet,.hljs-string,.hljs-symbol{color:#29a329}.hljs-section,.hljs-title{color:#3d62f5}.hljs-keyword,.hljs-selector-tag{color:#ad2bee}.hljs{display:block;overflow-x:auto;background:#131513;color:#8ca68c;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-seaside-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#687d68}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#e6193c}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#87711d}.hljs-bullet,.hljs-string,.hljs-symbol{color:#29a329}.hljs-section,.hljs-title{color:#3d62f5}.hljs-keyword,.hljs-selector-tag{color:#ad2bee}.hljs{display:block;overflow-x:auto;background:#f4fbf4;color:#5e6e5e;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-sulphurpool-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#898ea4}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#c94922}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#c76b29}.hljs-bullet,.hljs-string,.hljs-symbol{color:#ac9739}.hljs-section,.hljs-title{color:#3d8fd1}.hljs-keyword,.hljs-selector-tag{color:#6679cc}.hljs{display:block;overflow-x:auto;background:#202746;color:#979db4;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atelier-sulphurpool-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#6b7394}.hljs-attribute,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#c94922}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#c76b29}.hljs-bullet,.hljs-string,.hljs-symbol{color:#ac9739}.hljs-section,.hljs-title{color:#3d8fd1}.hljs-keyword,.hljs-selector-tag{color:#6679cc}.hljs{display:block;overflow-x:auto;background:#f5f7ff;color:#5e6687;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/atom-one-dark-reasonable.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#abb2bf;background:#282c34}.hljs-keyword,.hljs-operator{color:#f92672}.hljs-pattern-match{color:#f92672}.hljs-pattern-match .hljs-constructor{color:#61aeee}.hljs-function{color:#61aeee}.hljs-function .hljs-params{color:#a6e22e}.hljs-function .hljs-params .hljs-typing{color:#fd971f}.hljs-module-access .hljs-module{color:#7e57c2}.hljs-constructor{color:#e2b93d}.hljs-constructor .hljs-string{color:#9ccc65}.hljs-comment,.hljs-quote{color:#b18eb1;font-style:italic}.hljs-doctag,.hljs-formula{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-built_in,.hljs-class .hljs-title{color:#e6c07b}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} -------------------------------------------------------------------------------- /Sources/Assets/styles/atom-one-dark.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-built_in,.hljs-class .hljs-title{color:#e6c07b}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} -------------------------------------------------------------------------------- /Sources/Assets/styles/atom-one-light.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-built_in,.hljs-class .hljs-title{color:#c18401}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} -------------------------------------------------------------------------------- /Sources/Assets/styles/brown-paper.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#976d33}.hljs-keyword,.hljs-literal,.hljs-selector-tag{color:#059;font-weight:700}.hljs,.hljs-subst{color:#363c69}.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-link,.hljs-name,.hljs-section,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#2c009f}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#802022}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-title,.hljs-type{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/codepen-embed.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#222;color:#fff}.hljs-comment,.hljs-quote{color:#777}.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-deletion,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-regexp,.hljs-symbol,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ab875d}.hljs-attribute,.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-title,.hljs-type{color:#9b869b}.hljs-addition,.hljs-keyword,.hljs-selector-tag,.hljs-string{color:#8f9c6c}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/color-brewer.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff}.hljs,.hljs-subst{color:#000}.hljs-addition,.hljs-meta,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable{color:#756bb1}.hljs-comment,.hljs-quote{color:#636363}.hljs-bullet,.hljs-link,.hljs-literal,.hljs-number,.hljs-regexp{color:#31a354}.hljs-deletion,.hljs-variable{color:#88f}.hljs-built_in,.hljs-doctag,.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag,.hljs-strong,.hljs-tag,.hljs-title,.hljs-type{color:#3182bd}.hljs-emphasis{font-style:italic}.hljs-attribute{color:#e6550d} -------------------------------------------------------------------------------- /Sources/Assets/styles/darcula.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#2b2b2b;color:#bababa}.hljs-emphasis,.hljs-strong{color:#a8a8a2}.hljs-bullet,.hljs-link,.hljs-literal,.hljs-number,.hljs-quote,.hljs-regexp{color:#6896ba}.hljs-code,.hljs-selector-class{color:#a6e22e}.hljs-emphasis{font-style:italic}.hljs-attribute,.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-variable{color:#cb7832}.hljs-params{color:#b9b9b9}.hljs-string{color:#6a8759}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-selector-attr,.hljs-selector-id,.hljs-selector-pseudo,.hljs-subst,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-type{color:#e0c46c}.hljs-comment,.hljs-deletion,.hljs-meta{color:#7f7f7f} -------------------------------------------------------------------------------- /Sources/Assets/styles/dark.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#444}.hljs-keyword,.hljs-link,.hljs-literal,.hljs-section,.hljs-selector-tag{color:#fff}.hljs,.hljs-subst{color:#ddd}.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-name,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#d88}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#777}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-title,.hljs-type{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/default.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#f0f0f0}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#bc6060}.hljs-literal{color:#78a960}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/docco.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#000;background:#f8f8ff}.hljs-comment,.hljs-quote{color:#408080;font-style:italic}.hljs-keyword,.hljs-literal,.hljs-selector-tag,.hljs-subst{color:#954121}.hljs-number{color:#40a070}.hljs-doctag,.hljs-string{color:#219161}.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-type{color:#19469d}.hljs-params{color:#00f}.hljs-title{color:#458;font-weight:700}.hljs-attribute,.hljs-name,.hljs-tag{color:#000080;font-weight:400}.hljs-template-variable,.hljs-variable{color:#008080}.hljs-link,.hljs-regexp{color:#b68}.hljs-bullet,.hljs-symbol{color:#990073}.hljs-built_in,.hljs-builtin-name{color:#0086b3}.hljs-meta{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/dracula.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#282a36}.hljs-keyword,.hljs-link,.hljs-literal,.hljs-section,.hljs-selector-tag{color:#8be9fd}.hljs-function .hljs-keyword{color:#ff79c6}.hljs,.hljs-subst{color:#f8f8f2}.hljs-addition,.hljs-attribute,.hljs-bullet,.hljs-name,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#f1fa8c}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#6272a4}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-title,.hljs-type{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/far.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#000099}.hljs,.hljs-subst{color:#0ff}.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable{color:#ff0}.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag,.hljs-type,.hljs-variable{color:#fff}.hljs-comment,.hljs-deletion,.hljs-doctag,.hljs-quote{color:#888}.hljs-link,.hljs-literal,.hljs-number,.hljs-regexp{color:#0f0}.hljs-meta{color:#008080}.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-title{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/foundation.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#eee;color:#000}.hljs-addition,.hljs-attribute,.hljs-emphasis,.hljs-link{color:#070}.hljs-emphasis{font-style:italic}.hljs-deletion,.hljs-string,.hljs-strong{color:#d14}.hljs-strong{font-weight:700}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-section,.hljs-title{color:#900}.hljs-class .hljs-title,.hljs-type{color:#458}.hljs-template-variable,.hljs-variable{color:#369}.hljs-bullet{color:#970}.hljs-meta{color:#34b}.hljs-code,.hljs-keyword,.hljs-literal,.hljs-number,.hljs-selector-tag{color:#099}.hljs-regexp{background-color:#fff0ff;color:#808}.hljs-symbol{color:#990073}.hljs-name,.hljs-selector-class,.hljs-selector-id,.hljs-tag{color:#070} -------------------------------------------------------------------------------- /Sources/Assets/styles/github-dark.css: -------------------------------------------------------------------------------- 1 | pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px} 2 | .hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c} 3 | -------------------------------------------------------------------------------- /Sources/Assets/styles/github-gist.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;background:#fff;padding:.5em;color:#333;overflow-x:auto}.hljs-comment,.hljs-meta{color:#969896}.hljs-emphasis,.hljs-quote,.hljs-strong,.hljs-template-variable,.hljs-variable{color:#df5000}.hljs-keyword,.hljs-selector-tag,.hljs-type{color:#d73a49}.hljs-attribute,.hljs-bullet,.hljs-literal,.hljs-symbol{color:#0086b3}.hljs-name,.hljs-section{color:#63a35c}.hljs-tag{color:#333}.hljs-attr,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-title{color:#6f42c1}.hljs-addition{color:#55a532;background-color:#eaffea}.hljs-deletion{color:#bd2c00;background-color:#ffecec}.hljs-link{text-decoration:underline}.hljs-number{color:#005cc5}.hljs-string{color:#032f62} -------------------------------------------------------------------------------- /Sources/Assets/styles/github.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#f8f8f8}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:700}.hljs-literal,.hljs-number,.hljs-tag .hljs-attr,.hljs-template-variable,.hljs-variable{color:#008080}.hljs-doctag,.hljs-string{color:#d14}.hljs-section,.hljs-selector-id,.hljs-title{color:#900;font-weight:700}.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type{color:#458;font-weight:700}.hljs-attribute,.hljs-name,.hljs-tag{color:#000080;font-weight:400}.hljs-link,.hljs-regexp{color:#009926}.hljs-bullet,.hljs-symbol{color:#990073}.hljs-built_in,.hljs-builtin-name{color:#0086b3}.hljs-meta{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/gml.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#222;color:silver}.hljs-keyword{color:#ffb871;font-weight:700}.hljs-built_in{color:#ffb871}.hljs-literal{color:#ff8080}.hljs-symbol{color:#58e55a}.hljs-comment{color:#5b995b}.hljs-string{color:#ff0}.hljs-number{color:#ff8080}.hljs-addition,.hljs-attribute,.hljs-bullet,.hljs-code,.hljs-deletion,.hljs-doctag,.hljs-function,.hljs-link,.hljs-meta,.hljs-meta-keyword,.hljs-name,.hljs-quote,.hljs-regexp,.hljs-section,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-selector-tag,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:silver}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/googlecode.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.hljs-comment,.hljs-quote{color:#800}.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-title{color:#008}.hljs-template-variable,.hljs-variable{color:#660}.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string{color:#080}.hljs-bullet,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-symbol{color:#066}.hljs-attr,.hljs-built_in,.hljs-builtin-name,.hljs-doctag,.hljs-params,.hljs-title,.hljs-type{color:#606}.hljs-attribute,.hljs-subst{color:#000}.hljs-formula{background-color:#eee;font-style:italic}.hljs-selector-class,.hljs-selector-id{color:#9b703f}.hljs-addition{background-color:#baeeba}.hljs-deletion{background-color:#ffc8bd}.hljs-doctag,.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/gradient-dark.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#501f7a;background:linear-gradient(166deg,#501f7a 0,#2820b3 80%);color:#e7e4eb}.hljs-subtr{color:#e7e4eb}.hljs-comment,.hljs-doctag,.hljs-meta,.hljs-quote{color:#af8dd9}.hljs-attr,.hljs-regexp,.hljs-selector-id,.hljs-selector-tag,.hljs-tag,.hljs-template-tag{color:#aefbff}.hljs-bullet,.hljs-params,.hljs-selector-class{color:#f19fff}.hljs-keyword,.hljs-meta-keyword,.hljs-section,.hljs-symbol,.hljs-type{color:#17fc95}.hljs-addition,.hljs-link,.hljs-number{color:#c5fe00}.hljs-string{color:#38c0ff}.hljs-addition,.hljs-attribute{color:#e7ff9f}.hljs-template-variable,.hljs-variable{color:#e447ff}.hljs-built_in,.hljs-builtin-name,.hljs-class,.hljs-formula,.hljs-function,.hljs-name,.hljs-title{color:#ffc800}.hljs-deletion,.hljs-literal,.hljs-selector-pseudo{color:#ff9e44}.hljs-emphasis,.hljs-quote{font-style:italic}.hljs-keyword,.hljs-params,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag,.hljs-strong,.hljs-template-tag{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/gradient-light.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fffd8d;background:linear-gradient(142deg,#fffd8d 0,#fcb7ff 35%,#90ecff 100%);color:#250482}.hljs-subtr{color:#01958b}.hljs-comment,.hljs-doctag,.hljs-meta,.hljs-quote{color:#cb7200}.hljs-attr,.hljs-regexp,.hljs-selector-id,.hljs-selector-tag,.hljs-tag,.hljs-template-tag{color:#07bd5f}.hljs-bullet,.hljs-params,.hljs-selector-class{color:#43449f}.hljs-keyword,.hljs-meta-keyword,.hljs-section,.hljs-symbol,.hljs-type{color:#7d2801}.hljs-addition,.hljs-link,.hljs-number{color:#7f0096}.hljs-string{color:#38c0ff}.hljs-addition,.hljs-attribute{color:#296562}.hljs-template-variable,.hljs-variable{color:#025c8f}.hljs-built_in,.hljs-builtin-name,.hljs-class,.hljs-formula,.hljs-function,.hljs-name,.hljs-title{color:#529117}.hljs-deletion,.hljs-literal,.hljs-selector-pseudo{color:#ad13ff}.hljs-emphasis,.hljs-quote{font-style:italic}.hljs-keyword,.hljs-params,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag,.hljs-strong,.hljs-template-tag{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/grayscale.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#fff}.hljs-comment,.hljs-quote{color:#777;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:700}.hljs-literal,.hljs-number{color:#777}.hljs-doctag,.hljs-formula,.hljs-string{color:#333;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat}.hljs-section,.hljs-selector-id,.hljs-title{color:#000;font-weight:700}.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-name,.hljs-type{color:#333;font-weight:700}.hljs-tag{color:#333}.hljs-regexp{color:#333;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat}.hljs-bullet,.hljs-link,.hljs-symbol{color:#000;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat}.hljs-built_in,.hljs-builtin-name{color:#000;text-decoration:underline}.hljs-meta{color:#999;font-weight:700}.hljs-deletion{color:#fff;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat}.hljs-addition{color:#000;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/gruvbox-dark.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#282828}.hljs,.hljs-subst{color:#ebdbb2}.hljs-deletion,.hljs-formula,.hljs-keyword,.hljs-link,.hljs-selector-tag{color:#fb4934}.hljs-built_in,.hljs-emphasis,.hljs-name,.hljs-quote,.hljs-strong,.hljs-title,.hljs-variable{color:#83a598}.hljs-attr,.hljs-params,.hljs-template-tag,.hljs-type{color:#fabd2f}.hljs-builtin-name,.hljs-doctag,.hljs-literal,.hljs-number{color:#8f3f71}.hljs-code,.hljs-meta,.hljs-regexp,.hljs-selector-id,.hljs-template-variable{color:#fe8019}.hljs-addition,.hljs-meta-string,.hljs-section,.hljs-selector-attr,.hljs-selector-class,.hljs-string,.hljs-symbol{color:#b8bb26}.hljs-attribute,.hljs-bullet,.hljs-class,.hljs-function,.hljs-function .hljs-keyword,.hljs-meta-keyword,.hljs-selector-pseudo,.hljs-tag{color:#8ec07c}.hljs-comment{color:#928374}.hljs-link_label,.hljs-literal,.hljs-number{color:#d3869b}.hljs-comment,.hljs-emphasis{font-style:italic}.hljs-section,.hljs-strong,.hljs-tag{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/gruvbox-light.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fbf1c7}.hljs,.hljs-subst{color:#3c3836}.hljs-deletion,.hljs-formula,.hljs-keyword,.hljs-link,.hljs-selector-tag{color:#9d0006}.hljs-built_in,.hljs-emphasis,.hljs-name,.hljs-quote,.hljs-strong,.hljs-title,.hljs-variable{color:#076678}.hljs-attr,.hljs-params,.hljs-template-tag,.hljs-type{color:#b57614}.hljs-builtin-name,.hljs-doctag,.hljs-literal,.hljs-number{color:#8f3f71}.hljs-code,.hljs-meta,.hljs-regexp,.hljs-selector-id,.hljs-template-variable{color:#af3a03}.hljs-addition,.hljs-meta-string,.hljs-section,.hljs-selector-attr,.hljs-selector-class,.hljs-string,.hljs-symbol{color:#79740e}.hljs-attribute,.hljs-bullet,.hljs-class,.hljs-function,.hljs-function .hljs-keyword,.hljs-meta-keyword,.hljs-selector-pseudo,.hljs-tag{color:#427b58}.hljs-comment{color:#928374}.hljs-link_label,.hljs-literal,.hljs-number{color:#8f3f71}.hljs-comment,.hljs-emphasis{font-style:italic}.hljs-section,.hljs-strong,.hljs-tag{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/hopscotch.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#989498}.hljs-attribute,.hljs-deletion,.hljs-link,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#dd464c}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-number,.hljs-params,.hljs-type{color:#fd8b19}.hljs-class .hljs-title{color:#fdcc59}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#8fc13e}.hljs-meta{color:#149b93}.hljs-function,.hljs-section,.hljs-title{color:#1290bf}.hljs-keyword,.hljs-selector-tag{color:#c85e7c}.hljs{display:block;overflow-x:auto;background:#322931;color:#b9b5b8;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/hybrid.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#1d1f21}.hljs span::selection,.hljs::selection{background:#373b41}.hljs span::-moz-selection,.hljs::-moz-selection{background:#373b41}.hljs{color:#c5c8c6}.hljs-name,.hljs-title{color:#f0c674}.hljs-comment,.hljs-meta,.hljs-meta .hljs-keyword{color:#707880}.hljs-deletion,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol{color:#c66}.hljs-addition,.hljs-doctag,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string{color:#b5bd68}.hljs-attribute,.hljs-code,.hljs-selector-id{color:#b294bb}.hljs-bullet,.hljs-keyword,.hljs-selector-tag,.hljs-tag{color:#81a2be}.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-variable{color:#8abeb7}.hljs-built_in,.hljs-builtin-name,.hljs-quote,.hljs-section,.hljs-selector-class,.hljs-type{color:#de935f}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/idea.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#000;background:#fff}.hljs-subst,.hljs-title{font-weight:400;color:#000}.hljs-comment,.hljs-quote{color:#808080;font-style:italic}.hljs-meta{color:#808000}.hljs-tag{background:#efefef}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-selector-tag,.hljs-type{font-weight:700;color:#000080}.hljs-attribute,.hljs-link,.hljs-number,.hljs-regexp{font-weight:700;color:#00f}.hljs-link,.hljs-number,.hljs-regexp{font-weight:400}.hljs-string{color:#008000;font-weight:700}.hljs-bullet,.hljs-formula,.hljs-symbol{color:#000;background:#d0eded;font-style:italic}.hljs-doctag{text-decoration:underline}.hljs-template-variable,.hljs-variable{color:#660e7a}.hljs-addition{background:#baeeba}.hljs-deletion{background:#ffc8bd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/ir-black.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#000;color:#f8f8f8}.hljs-comment,.hljs-meta,.hljs-quote{color:#7c7c7c}.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#96cbfe}.hljs-attribute,.hljs-selector-id{color:#ffffb6}.hljs-addition,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string{color:#a8ff60}.hljs-subst{color:#daefa3}.hljs-link,.hljs-regexp{color:#e9c062}.hljs-doctag,.hljs-section,.hljs-title,.hljs-type{color:#ffffb6}.hljs-bullet,.hljs-literal,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#c6c5fe}.hljs-deletion,.hljs-number{color:#ff73fd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/isbl-editor-dark.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#404040;color:#f0f0f0}.hljs,.hljs-subst{color:#f0f0f0}.hljs-comment{color:#b5b5b5;font-style:italic}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta-keyword,.hljs-name,.hljs-selector-tag{color:#f0f0f0;font-weight:700}.hljs-string{color:#97bf0d}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#f0f0f0}.hljs-section,.hljs-title{color:#df471e}.hljs-title>.hljs-built_in{color:#81bce9;font-weight:400}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#e2c696}.hljs-built_in,.hljs-literal{color:#97bf0d;font-weight:700}.hljs-addition,.hljs-bullet,.hljs-code{color:#397300}.hljs-class{color:#ce9d4d;font-weight:700}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/isbl-editor-light.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.hljs-subst{color:#000}.hljs-comment{color:#555;font-style:italic}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta-keyword,.hljs-name,.hljs-selector-tag{color:#000;font-weight:700}.hljs-string{color:#000080}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#000}.hljs-section,.hljs-title{color:#fb2c00}.hljs-title>.hljs-built_in{color:#008080;font-weight:400}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#5e1700}.hljs-built_in,.hljs-literal{color:#000080;font-weight:700}.hljs-addition,.hljs-bullet,.hljs-code{color:#397300}.hljs-class{color:#6f1c00;font-weight:700}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/kimbie-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#d6baad}.hljs-meta,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#dc3958}.hljs-built_in,.hljs-builtin-name,.hljs-deletion,.hljs-link,.hljs-literal,.hljs-number,.hljs-params,.hljs-type{color:#f79a32}.hljs-attribute,.hljs-section,.hljs-title{color:#f06431}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#889b4a}.hljs-function,.hljs-keyword,.hljs-selector-tag{color:#98676a}.hljs{display:block;overflow-x:auto;background:#221a0f;color:#d3af86;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/kimbie-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#a57a4c}.hljs-meta,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#dc3958}.hljs-built_in,.hljs-builtin-name,.hljs-deletion,.hljs-link,.hljs-literal,.hljs-number,.hljs-params,.hljs-type{color:#f79a32}.hljs-attribute,.hljs-section,.hljs-title{color:#f06431}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#889b4a}.hljs-function,.hljs-keyword,.hljs-selector-tag{color:#98676a}.hljs{display:block;overflow-x:auto;background:#fbebd4;color:#84613d;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/lightfair.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff}.hljs-name{color:#01a3a3}.hljs-meta,.hljs-tag{color:#789}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#4286f4}.hljs-section,.hljs-title{color:#4286f4;font-weight:700}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#bc6060}.hljs-literal{color:#62bcbc}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#25c6c6}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/lioshi.css: -------------------------------------------------------------------------------- 1 | .hljs-comment{color:#8d8d8d}.hljs-quote{color:#b3c7d8}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#c66}.hljs-built_in,.hljs-builtin-name,.hljs-literal,.hljs-number,.hljs-subst .hljs-link,.hljs-type{color:#de935f}.hljs-attribute{color:#f0c674}.hljs-addition,.hljs-bullet,.hljs-params,.hljs-string{color:#b5bd68}.hljs-meta,.hljs-section,.hljs-title{color:#81a2be}.hljs-class,.hljs-function,.hljs-keyword,.hljs-selector-tag{color:#be94bb}.hljs-symbol{color:#dbc4d9}.hljs{display:block;overflow-x:auto;background:#303030;color:#c5c8c6;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/magula.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background-color:#f4f4f4;color:#000}.hljs-subst{color:#000}.hljs-addition,.hljs-attribute,.hljs-bullet,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-variable{color:#050}.hljs-comment,.hljs-quote{color:#777}.hljs-link,.hljs-literal,.hljs-number,.hljs-regexp,.hljs-type{color:#800}.hljs-deletion,.hljs-meta{color:#00e}.hljs-built_in,.hljs-doctag,.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-tag,.hljs-title{font-weight:700;color:#000080}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/mono-blue.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#eaeef3;color:#00193a}.hljs-doctag,.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-title{font-weight:700}.hljs-comment{color:#738191}.hljs-addition,.hljs-built_in,.hljs-literal,.hljs-name,.hljs-quote,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-tag,.hljs-title,.hljs-type{color:#0048ab}.hljs-attribute,.hljs-bullet,.hljs-deletion,.hljs-link,.hljs-meta,.hljs-regexp,.hljs-subst,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#4c81c9}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/monokai-sublime.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#23241f}.hljs,.hljs-subst,.hljs-tag{color:#f8f8f2}.hljs-emphasis,.hljs-strong{color:#a8a8a2}.hljs-bullet,.hljs-link,.hljs-literal,.hljs-number,.hljs-quote,.hljs-regexp{color:#ae81ff}.hljs-code,.hljs-section,.hljs-selector-class,.hljs-title{color:#a6e22e}.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic}.hljs-attr,.hljs-keyword,.hljs-name,.hljs-selector-tag{color:#f92672}.hljs-attribute,.hljs-symbol{color:#66d9ef}.hljs-class .hljs-title,.hljs-params{color:#f8f8f2}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-selector-attr,.hljs-selector-id,.hljs-selector-pseudo,.hljs-string,.hljs-template-variable,.hljs-type,.hljs-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e} -------------------------------------------------------------------------------- /Sources/Assets/styles/monokai.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#272822;color:#ddd}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-selector-tag,.hljs-strong,.hljs-tag{color:#f92672}.hljs-code{color:#66d9ef}.hljs-class .hljs-title{color:#fff}.hljs-attribute,.hljs-link,.hljs-regexp,.hljs-symbol{color:#bf79db}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-emphasis,.hljs-section,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#a6e22e}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#75715e}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-section,.hljs-selector-id,.hljs-selector-tag,.hljs-title,.hljs-type{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/night-owl.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#011627;color:#d6deeb}.hljs-keyword{color:#c792ea;font-style:italic}.hljs-built_in{color:#addb67;font-style:italic}.hljs-type{color:#82aaff}.hljs-literal{color:#ff5874}.hljs-number{color:#f78c6c}.hljs-regexp{color:#5ca7e4}.hljs-string{color:#ecc48d}.hljs-subst{color:#d3423e}.hljs-symbol{color:#82aaff}.hljs-class{color:#ffcb8b}.hljs-function{color:#82aaff}.hljs-title{color:#dcdcaa;font-style:italic}.hljs-params{color:#7fdbca}.hljs-comment{color:#637777;font-style:italic}.hljs-doctag{color:#7fdbca}.hljs-meta{color:#82aaff}.hljs-meta-keyword{color:#82aaff}.hljs-meta-string{color:#ecc48d}.hljs-section{color:#82b1ff}.hljs-builtin-name,.hljs-name,.hljs-tag{color:#7fdbca}.hljs-attr{color:#7fdbca}.hljs-attribute{color:#80cbc4}.hljs-variable{color:#addb67}.hljs-bullet{color:#d9f5dd}.hljs-code{color:#80cbc4}.hljs-emphasis{color:#c792ea;font-style:italic}.hljs-strong{color:#addb67;font-weight:700}.hljs-formula{color:#c792ea}.hljs-link{color:#ff869a}.hljs-quote{color:#697098;font-style:italic}.hljs-selector-tag{color:#ff6363}.hljs-selector-id{color:#fad430}.hljs-selector-class{color:#addb67;font-style:italic}.hljs-selector-attr,.hljs-selector-pseudo{color:#c792ea;font-style:italic}.hljs-template-tag{color:#c792ea}.hljs-template-variable{color:#addb67}.hljs-addition{color:#addb67ff;font-style:italic}.hljs-deletion{color:#ef535090;font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/nnfx-dark.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#333;color:#fff}.xml .hljs-meta{font-weight:700;font-style:italic;color:#69f}.hljs-comment,.hljs-quote{font-style:italic;color:#9c6}.hljs-keyword,.hljs-name{color:#a7a}.hljs-attr,.hljs-name{font-weight:700}.hljs-string{font-weight:400}.hljs-template-variable,.hljs-variable{color:#588}.hljs-code,.hljs-link,.hljs-meta-string,.hljs-number,.hljs-regexp,.hljs-string{color:#bce}.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-symbol,.hljs-title{color:#d40}.hljs-meta,.hljs-section{color:#a85}.hljs-class .hljs-title,.hljs-type{color:#96c}.hljs-attr,.hljs-function .hljs-title,.hljs-subst{color:#fff}.hljs-formula{background-color:#eee;font-style:italic}.hljs-addition{background-color:#797}.hljs-deletion{background-color:#c99}.hljs-selector-class,.hljs-selector-id{color:#964}.hljs-doctag,.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/nnfx-light.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.xml .hljs-meta{font-weight:700;font-style:italic;color:#48b}.hljs-comment,.hljs-quote{font-style:italic;color:#070}.hljs-keyword,.hljs-name{color:#808}.hljs-attr,.hljs-name{font-weight:700}.hljs-string{font-weight:400}.hljs-template-variable,.hljs-variable{color:#477}.hljs-code,.hljs-link,.hljs-meta-string,.hljs-number,.hljs-regexp,.hljs-string{color:#00f}.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-symbol,.hljs-title{color:#f40}.hljs-meta,.hljs-section{color:#642}.hljs-class .hljs-title,.hljs-type{color:#639}.hljs-attr,.hljs-function .hljs-title,.hljs-subst{color:#000}.hljs-formula{background-color:#eee;font-style:italic}.hljs-addition{background-color:#beb}.hljs-deletion{background-color:#fbb}.hljs-selector-class,.hljs-selector-id{color:#964}.hljs-doctag,.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/nord.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#2e3440}.hljs,.hljs-subst{color:#d8dee9}.hljs-selector-tag{color:#81a1c1}.hljs-selector-id{color:#8fbcbb;font-weight:700}.hljs-selector-class{color:#8fbcbb}.hljs-selector-attr{color:#8fbcbb}.hljs-selector-pseudo{color:#88c0d0}.hljs-addition{background-color:#A3BE8C80}.hljs-deletion{background-color:#BF616A80}.hljs-built_in,.hljs-type{color:#8fbcbb}.hljs-class{color:#8fbcbb}.hljs-function{color:#88c0d0}.hljs-function>.hljs-title{color:#88c0d0}.hljs-keyword,.hljs-literal,.hljs-symbol{color:#81a1c1}.hljs-number{color:#b48ead}.hljs-regexp{color:#ebcb8b}.hljs-string{color:#a3be8c}.hljs-title{color:#8fbcbb}.hljs-params{color:#d8dee9}.hljs-bullet{color:#81a1c1}.hljs-code{color:#8fbcbb}.hljs-emphasis{font-style:italic}.hljs-formula{color:#8fbcbb}.hljs-strong{font-weight:700}.hljs-link:hover{text-decoration:underline}.hljs-quote{color:#4c566a}.hljs-comment{color:#4c566a}.hljs-doctag{color:#8fbcbb}.hljs-meta,.hljs-meta-keyword{color:#5e81ac}.hljs-meta-string{color:#a3be8c}.hljs-attr{color:#8fbcbb}.hljs-attribute{color:#d8dee9}.hljs-builtin-name{color:#81a1c1}.hljs-name{color:#81a1c1}.hljs-section{color:#88c0d0}.hljs-tag{color:#81a1c1}.hljs-variable{color:#d8dee9}.hljs-template-variable{color:#d8dee9}.hljs-template-tag{color:#5e81ac}.abnf .hljs-attribute{color:#88c0d0}.abnf .hljs-symbol{color:#ebcb8b}.apache .hljs-attribute{color:#88c0d0}.apache .hljs-section{color:#81a1c1}.arduino .hljs-built_in{color:#88c0d0}.aspectj .hljs-meta{color:#d08770}.aspectj>.hljs-title{color:#88c0d0}.bnf .hljs-attribute{color:#8fbcbb}.clojure .hljs-name{color:#88c0d0}.clojure .hljs-symbol{color:#ebcb8b}.coq .hljs-built_in{color:#88c0d0}.cpp .hljs-meta-string{color:#8fbcbb}.css .hljs-built_in{color:#88c0d0}.css .hljs-keyword{color:#d08770}.diff .hljs-meta{color:#8fbcbb}.ebnf .hljs-attribute{color:#8fbcbb}.glsl .hljs-built_in{color:#88c0d0}.groovy .hljs-meta:not(:first-child){color:#d08770}.haxe .hljs-meta{color:#d08770}.java .hljs-meta{color:#d08770}.ldif .hljs-attribute{color:#8fbcbb}.lisp .hljs-name{color:#88c0d0}.lua .hljs-built_in{color:#88c0d0}.moonscript .hljs-built_in{color:#88c0d0}.nginx .hljs-attribute{color:#88c0d0}.nginx .hljs-section{color:#5e81ac}.pf .hljs-built_in{color:#88c0d0}.processing .hljs-built_in{color:#88c0d0}.scss .hljs-keyword{color:#81a1c1}.stylus .hljs-keyword{color:#81a1c1}.swift .hljs-meta{color:#d08770}.vim .hljs-built_in{color:#88c0d0;font-style:italic}.yaml .hljs-meta{color:#d08770} -------------------------------------------------------------------------------- /Sources/Assets/styles/obsidian.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#282b2e}.hljs-keyword,.hljs-literal,.hljs-selector-id,.hljs-selector-tag{color:#93c763}.hljs-number{color:#ffcd22}.hljs-attribute{color:#668bb0}.hljs-class .hljs-title,.hljs-code,.hljs-section{color:#fff}.hljs-link,.hljs-regexp{color:#d39745}.hljs-meta{color:#557182}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-emphasis,.hljs-name,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-subst,.hljs-tag,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable{color:#8cbbad}.hljs-string,.hljs-symbol{color:#ec7600}.hljs-comment,.hljs-deletion,.hljs-quote{color:#818e96}.hljs-selector-class{color:#a082bd}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-strong,.hljs-title,.hljs-type{font-weight:700},.hljs{color:#e0e2e4} 2 | -------------------------------------------------------------------------------- /Sources/Assets/styles/ocean.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#65737e}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#bf616a}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#d08770}.hljs-attribute{color:#ebcb8b}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#a3be8c}.hljs-section,.hljs-title{color:#8fa1b3}.hljs-keyword,.hljs-selector-tag{color:#b48ead}.hljs{display:block;overflow-x:auto;background:#2b303b;color:#c0c5ce;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/paraiso-dark.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#8d8687}.hljs-link,.hljs-meta,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ef6155}.hljs-built_in,.hljs-builtin-name,.hljs-deletion,.hljs-literal,.hljs-number,.hljs-params,.hljs-type{color:#f99b15}.hljs-attribute,.hljs-section,.hljs-title{color:#fec418}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#48b685}.hljs-keyword,.hljs-selector-tag{color:#815ba4}.hljs{display:block;overflow-x:auto;background:#2f1e2e;color:#a39e9b;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/paraiso-light.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#776e71}.hljs-link,.hljs-meta,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ef6155}.hljs-built_in,.hljs-builtin-name,.hljs-deletion,.hljs-literal,.hljs-number,.hljs-params,.hljs-type{color:#f99b15}.hljs-attribute,.hljs-section,.hljs-title{color:#fec418}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#48b685}.hljs-keyword,.hljs-selector-tag{color:#815ba4}.hljs{display:block;overflow-x:auto;background:#e7e9db;color:#4f424c;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/pojoaque.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#dccf8f;background:#181914}.hljs-comment,.hljs-quote{color:#586e75;font-style:italic}.hljs-addition,.hljs-keyword,.hljs-literal,.hljs-selector-tag{color:#b64926}.hljs-doctag,.hljs-number,.hljs-regexp,.hljs-string{color:#468966}.hljs-built_in,.hljs-name,.hljs-section,.hljs-title{color:#ffb03b}.hljs-class .hljs-title,.hljs-tag,.hljs-template-variable,.hljs-type,.hljs-variable{color:#b58900}.hljs-attribute{color:#b89859}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-subst,.hljs-symbol{color:#cb4b16}.hljs-deletion{color:#dc322f}.hljs-selector-class,.hljs-selector-id{color:#d3a60c}.hljs-formula{background:#073642}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/purebasic.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#ffffdf}.hljs,.hljs-attr,.hljs-function,.hljs-name,.hljs-number,.hljs-params,.hljs-subst,.hljs-type{color:#000}.hljs-addition,.hljs-comment,.hljs-regexp,.hljs-section,.hljs-selector-pseudo{color:#0aa}.hljs-code,.hljs-tag,.hljs-title,.hljs-variable{color:#066}.hljs-built_in,.hljs-builtin-name,.hljs-class,.hljs-keyword,.hljs-meta-keyword,.hljs-selector-class{color:#066;font-weight:700}.hljs-selector-attr,.hljs-string{color:#0080ff}.hljs-attribute,.hljs-deletion,.hljs-link,.hljs-symbol{color:#924b72}.hljs-literal,.hljs-meta,.hljs-selector-id{color:#924b72;font-weight:700}.hljs-name,.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/qtcreator_dark.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#000}.hljs,.hljs-subst,.hljs-tag,.hljs-title{color:#aaa}.hljs-emphasis,.hljs-strong{color:#a8a8a2}.hljs-bullet,.hljs-literal,.hljs-number,.hljs-quote,.hljs-regexp{color:#f5f}.hljs-code .hljs-selector-class{color:#aaf}.hljs-emphasis,.hljs-stronge,.hljs-type{font-style:italic}.hljs-function,.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-symbol{color:#ff5}.hljs-attribute{color:#f55}.hljs-class .hljs-title,.hljs-params,.hljs-variable{color:#88f}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-selector-attr,.hljs-selector-id,.hljs-selector-pseudo,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-type{color:#f5f}.hljs-comment,.hljs-deletion,.hljs-meta{color:#5ff} -------------------------------------------------------------------------------- /Sources/Assets/styles/qtcreator_light.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff}.hljs,.hljs-subst,.hljs-tag,.hljs-title{color:#000}.hljs-emphasis,.hljs-strong{color:#000}.hljs-bullet,.hljs-literal,.hljs-number,.hljs-quote,.hljs-regexp{color:#000080}.hljs-code .hljs-selector-class{color:#800080}.hljs-emphasis,.hljs-stronge,.hljs-type{font-style:italic}.hljs-function,.hljs-keyword,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-symbol{color:#808000}.hljs-attribute{color:#800000}.hljs-class .hljs-title,.hljs-params,.hljs-variable{color:#0055af}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-selector-attr,.hljs-selector-id,.hljs-selector-pseudo,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-type{color:#008000}.hljs-comment,.hljs-deletion,.hljs-meta{color:#008000} -------------------------------------------------------------------------------- /Sources/Assets/styles/railscasts.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#232323;color:#e6e1dc}.hljs-comment,.hljs-quote{color:#bc9458;font-style:italic}.hljs-keyword,.hljs-selector-tag{color:#c26230}.hljs-number,.hljs-regexp,.hljs-string,.hljs-template-variable,.hljs-variable{color:#a5c261}.hljs-subst{color:#519f50}.hljs-name,.hljs-tag{color:#e8bf6a}.hljs-type{color:#da4939}.hljs-attr,.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-link,.hljs-symbol{color:#6d9cbe}.hljs-params{color:#d0d0ff}.hljs-attribute{color:#cda869}.hljs-meta{color:#9b859d}.hljs-section,.hljs-title{color:#ffc66d}.hljs-addition{background-color:#144212;color:#e6e1dc;display:inline-block;width:100%}.hljs-deletion{background-color:#600;color:#e6e1dc;display:inline-block;width:100%}.hljs-selector-class{color:#9b703f}.hljs-selector-id{color:#8b98ab}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline} -------------------------------------------------------------------------------- /Sources/Assets/styles/rainbow.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#474949;color:#d1d9e1}.hljs-comment,.hljs-quote{color:#969896;font-style:italic}.hljs-addition,.hljs-keyword,.hljs-literal,.hljs-selector-tag,.hljs-type{color:#c9c}.hljs-number,.hljs-selector-attr,.hljs-selector-pseudo{color:#f99157}.hljs-doctag,.hljs-regexp,.hljs-string{color:#8abeb7}.hljs-built_in,.hljs-name,.hljs-section,.hljs-title{color:#b5bd68}.hljs-class .hljs-title,.hljs-selector-id,.hljs-template-variable,.hljs-variable{color:#fc6}.hljs-name,.hljs-section,.hljs-strong{font-weight:700}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-subst,.hljs-symbol{color:#f99157}.hljs-deletion{color:#dc322f}.hljs-formula{background:#eee8d5}.hljs-attr,.hljs-attribute{color:#81a2be}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/routeros.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#f0f0f0}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888}.hljs-doctag,.hljs-keyword,.hljs-meta-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-attribute{color:#0e9a00}.hljs-function{color:#99069a}.hljs-builtin-name{color:#99069a}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#bc6060}.hljs-literal{color:#78a960}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#0c9a9a}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/school-book.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:15px .5em .5em 30px;font-size:11px;line-height:16px;background:#f6f6ae;border-top:solid 2px #d2e8b9;border-bottom:solid 1px #d2e8b9}.hljs-keyword,.hljs-literal,.hljs-selector-tag{color:#059;font-weight:700}.hljs,.hljs-subst{color:#3e5915}.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-builtin-name,.hljs-bullet,.hljs-link,.hljs-section,.hljs-string,.hljs-symbol,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#2c009f}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#e60415}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-section,.hljs-selector-id,.hljs-selector-tag,.hljs-strong,.hljs-title,.hljs-type{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/shades-of-purple.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#2d2b57;font-weight:400}.hljs-title{color:#fad000;font-weight:400}.hljs-name{color:#a1feff}.hljs-tag{color:#fff}.hljs-attr{color:#f8d000;font-style:italic}.hljs-built_in,.hljs-section,.hljs-selector-tag{color:#fb9e00}.hljs-keyword{color:#fb9e00}.hljs,.hljs-subst{color:#e3dfff}.hljs-addition,.hljs-attribute,.hljs-bullet,.hljs-code,.hljs-deletion,.hljs-quote,.hljs-regexp,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-string,.hljs-symbol,.hljs-template-tag{color:#4cd213}.hljs-meta,.hljs-meta-string{color:#fb9e00}.hljs-comment{color:#ac65ff}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-selector-tag,.hljs-strong{font-weight:400}.hljs-literal,.hljs-number{color:#fa658d}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/silk-dark.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Theme: Silk Dark 3 | Author: Gabriel Fontes (https://github.com/Misterio77) 4 | License: ~ MIT (or more permissive) [via base16-schemes-source] 5 | Maintainer: @highlightjs/core-team 6 | Version: 2021.05.0 7 | */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#c7dbdd;background:#0e3c46}.hljs ::selection{color:#2a5054}.hljs-comment{color:#587073}.hljs-tag{color:#9dc8cd}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#c7dbdd}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#fb6953}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#fcab74}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#fce380}.hljs-strong{font-weight:700;color:#fce380}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#73d8ad}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#3fb2b9}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#46bddd}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#756b8a}.hljs-emphasis{color:#756b8a;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#9b647b}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/silk-light.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Theme: Silk Light 3 | Author: Gabriel Fontes (https://github.com/Misterio77) 4 | License: ~ MIT (or more permissive) [via base16-schemes-source] 5 | Maintainer: @highlightjs/core-team 6 | Version: 2021.05.0 7 | */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#385156;background:#e9f1ef}.hljs ::selection{color:#90b7b6}.hljs-comment{color:#5c787b}.hljs-tag{color:#4b5b5f}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#385156}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#cf432e}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#d27f46}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#cfad25}.hljs-strong{font-weight:700;color:#cfad25}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#6ca38c}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#329ca2}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#39aac9}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#6e6582}.hljs-emphasis{color:#6e6582;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#865369}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/snazzy.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Theme: Snazzy 3 | Author: Chawye Hsu (https://github.com/chawyehsu) based on Hyper Snazzy Theme (https://github.com/sindresorhus/hyper-snazzy) 4 | License: ~ MIT (or more permissive) [via base16-schemes-source] 5 | Maintainer: @highlightjs/core-team 6 | Version: 2021.05.0 7 | */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#e2e4e5;background:#282a36}.hljs ::selection{color:#43454f}.hljs-comment{color:#78787e}.hljs-tag{color:#a5a5a9}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#e2e4e5}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#ff5c57}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#ff9f43}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#f3f99d}.hljs-strong{font-weight:700;color:#f3f99d}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#5af78e}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#9aedfe}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#57c7ff}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#ff6ac1}.hljs-emphasis{color:#ff6ac1;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#b2643c}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/solarized-dark.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#002b36;color:#839496}.hljs-comment,.hljs-quote{color:#586e75}.hljs-addition,.hljs-keyword,.hljs-selector-tag{color:#859900}.hljs-doctag,.hljs-literal,.hljs-meta .hljs-meta-string,.hljs-number,.hljs-regexp,.hljs-string{color:#2aa198}.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-title{color:#268bd2}.hljs-attr,.hljs-attribute,.hljs-class .hljs-title,.hljs-template-variable,.hljs-type,.hljs-variable{color:#b58900}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-subst,.hljs-symbol{color:#cb4b16}.hljs-built_in,.hljs-deletion{color:#dc322f}.hljs-formula{background:#073642}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/solarized-light.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fdf6e3;color:#657b83}.hljs-comment,.hljs-quote{color:#93a1a1}.hljs-addition,.hljs-keyword,.hljs-selector-tag{color:#859900}.hljs-doctag,.hljs-literal,.hljs-meta .hljs-meta-string,.hljs-number,.hljs-regexp,.hljs-string{color:#2aa198}.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-title{color:#268bd2}.hljs-attr,.hljs-attribute,.hljs-class .hljs-title,.hljs-template-variable,.hljs-type,.hljs-variable{color:#b58900}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-subst,.hljs-symbol{color:#cb4b16}.hljs-built_in,.hljs-deletion{color:#dc322f}.hljs-formula{background:#eee8d5}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/srcery.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#1c1b19;color:#fce8c3}.hljs-emphasis,.hljs-strong{color:#918175}.hljs-bullet,.hljs-link,.hljs-literal,.hljs-number,.hljs-quote,.hljs-regexp{color:#ff5c8f}.hljs-code,.hljs-selector-class{color:#68a8e4}.hljs-emphasis{font-style:italic}.hljs-attribute,.hljs-keyword,.hljs-section,.hljs-selector-tag,.hljs-variable{color:#ef2f27}.hljs-name,.hljs-title{color:#fbb829}.hljs-params,.hljs-type{color:#0aaeb3}.hljs-string{color:#98bc37}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-selector-attr,.hljs-selector-id,.hljs-selector-pseudo,.hljs-subst,.hljs-symbol,.hljs-template-tag,.hljs-template-variable{color:#c07abe}.hljs-comment,.hljs-deletion,.hljs-meta{color:#918175} -------------------------------------------------------------------------------- /Sources/Assets/styles/stackoverflow-dark.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * StackOverflow.com dark style 3 | * 4 | * @stackoverflow/stacks v0.56.0 5 | * https://github.com/StackExchange/Stacks 6 | */.hljs{display:block;overflow-x:auto;padding:.5em;color:#fff;background:#1c1b1b}.hljs-comment{color:#999}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta,.hljs-meta-keyword,.hljs-section,.hljs-selector-class,.hljs-selector-pseudo,.hljs-selector-tag{color:#88aece}.hljs-attribute{color:#c59bc1}.hljs-built_in,.hljs-literal,.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-title,.hljs-type{color:#f08d49}.hljs-link,.hljs-meta-string,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#b5bd68}.hljs-bullet,.hljs-code{color:#ccc}.hljs-deletion{color:#de7176}.hljs-addition{color:#76c490}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/stackoverflow-light.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * StackOverflow.com light style 3 | * 4 | * @stackoverflow/stacks v0.56.0 5 | * https://github.com/StackExchange/Stacks 6 | */.hljs{display:block;overflow-x:auto;padding:.5em;color:#2f3337;background:#f6f6f6}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta,.hljs-meta-keyword,.hljs-section,.hljs-selector-class,.hljs-selector-pseudo,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-built_in,.hljs-literal,.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-title,.hljs-type{color:#b75501}.hljs-link,.hljs-meta-string,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-bullet,.hljs-code{color:#535a60}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/sunburst.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#000;color:#f8f8f8}.hljs-comment,.hljs-quote{color:#aeaeae;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-type{color:#e28964}.hljs-string{color:#65b042}.hljs-subst{color:#daefa3}.hljs-link,.hljs-regexp{color:#e9c062}.hljs-name,.hljs-section,.hljs-tag,.hljs-title{color:#89bdff}.hljs-class .hljs-title,.hljs-doctag{text-decoration:underline}.hljs-bullet,.hljs-number,.hljs-symbol{color:#3387cc}.hljs-params,.hljs-template-variable,.hljs-variable{color:#3e87e3}.hljs-attribute{color:#cda869}.hljs-meta{color:#8996a8}.hljs-formula{background-color:#0e2231;color:#f8f8f8;font-style:italic}.hljs-addition{background-color:#253b22;color:#f8f8f8}.hljs-deletion{background-color:#420e09;color:#f8f8f8}.hljs-selector-class{color:#9b703f}.hljs-selector-id{color:#8b98ab}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/tomorrow-night-blue.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#7285b7}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ff9da4}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#ffc58f}.hljs-attribute{color:#ffeead}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#d1f1a9}.hljs-section,.hljs-title{color:#bbdaff}.hljs-keyword,.hljs-selector-tag{color:#ebbbff}.hljs{display:block;overflow-x:auto;background:#002451;color:#fff;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#969896}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#d54e53}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#e78c45}.hljs-attribute{color:#e7c547}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#b9ca4a}.hljs-section,.hljs-title{color:#7aa6da}.hljs-keyword,.hljs-selector-tag{color:#c397d8}.hljs{display:block;overflow-x:auto;background:#000;color:#eaeaea;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/tomorrow-night-eighties.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#999}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#f2777a}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f99157}.hljs-attribute{color:#fc6}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#9c9}.hljs-section,.hljs-title{color:#69c}.hljs-keyword,.hljs-selector-tag{color:#c9c}.hljs{display:block;overflow-x:auto;background:#2d2d2d;color:#ccc;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/tomorrow-night.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#969896}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#c66}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#de935f}.hljs-attribute{color:#f0c674}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#b5bd68}.hljs-section,.hljs-title{color:#81a2be}.hljs-keyword,.hljs-selector-tag{color:#b294bb}.hljs{display:block;overflow-x:auto;background:#1d1f21;color:#c5c8c6;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/tomorrow.css: -------------------------------------------------------------------------------- 1 | .hljs-comment,.hljs-quote{color:#8e908c}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#c82829}.hljs-built_in,.hljs-builtin-name,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5871f}.hljs-attribute{color:#eab700}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#718c00}.hljs-section,.hljs-title{color:#4271ae}.hljs-keyword,.hljs-selector-tag{color:#8959a8}.hljs{display:block;overflow-x:auto;background:#fff;color:#4d4d4c;padding:.5em}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/vs.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:#008000}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:#808080}.hljs-attr{color:#ff0000}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/vs2015.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#1e1e1e;color:#dcdcdc}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-symbol{color:#569cd6}.hljs-link{color:#569cd6;text-decoration:underline}.hljs-built_in,.hljs-type{color:#4ec9b0}.hljs-class,.hljs-number{color:#b8d7a3}.hljs-meta-string,.hljs-string{color:#d69d85}.hljs-regexp,.hljs-template-tag{color:#9a5334}.hljs-formula,.hljs-function,.hljs-params,.hljs-subst,.hljs-title{color:#dcdcdc}.hljs-comment,.hljs-quote{color:#57a64a;font-style:italic}.hljs-doctag{color:#608b4e}.hljs-meta,.hljs-meta-keyword,.hljs-tag{color:#9b9b9b}.hljs-template-variable,.hljs-variable{color:#bd63c5}.hljs-attr,.hljs-attribute,.hljs-builtin-name{color:#9cdcfe}.hljs-section{color:#FFD700}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-bullet,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-selector-tag{color:#d7ba7d}.hljs-addition{background-color:#144212;display:inline-block;width:100%}.hljs-deletion{background-color:#600;display:inline-block;width:100%} -------------------------------------------------------------------------------- /Sources/Assets/styles/vulcan.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Theme: vulcan 3 | Author: Andrey Varfolomeev 4 | License: ~ MIT (or more permissive) [via base16-schemes-source] 5 | Maintainer: @highlightjs/core-team 6 | Version: 2021.05.0 7 | */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#5b778c;background:#041523}.hljs ::selection{color:#003552}.hljs-comment{color:#7a5759}.hljs-tag{color:#6b6977}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#5b778c}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#818591}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#9198a3}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#adb4b9}.hljs-strong{font-weight:700;color:#adb4b9}.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-code,.hljs-doctag,.hljs-function .hljs-title,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp,.hljs-section,.hljs-string,.hljs-title.class_.inherited__,.hljs-title.function_,.ruby .hljs-property{color:#977d7c}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#9198a3}.hljs-emphasis{color:#9198a3;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#977d7c}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/xcode-dusk.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Theme: XCode Dusk 3 | Author: Elsa Gonsiorowski (https://github.com/gonsie) 4 | License: ~ MIT (or more permissive) [via base16-schemes-source] 5 | Maintainer: @highlightjs/core-team 6 | Version: 2021.05.0 7 | */ 8 | .hljs{display:block;overflow-x:auto;padding:1em;color:#939599;background:#282b35}.xml .hljs-meta{color:#939599;}.hljs-comment{color:#686a71}.hljs-tag{color:#7e8086}.hljs-operator,.hljs-punctuation,.hljs-subst{color:#939599}.hljs-operator{opacity:.7}.hljs-bullet,.hljs-deletion,.hljs-name,.hljs-selector-tag,.hljs-template-variable,.hljs-variable{color:#b21889}.hljs-attr,.hljs-link,.hljs-literal,.hljs-number,.hljs-symbol,.hljs-variable.constant_{color:#786dc5}.hljs-class .hljs-title,.hljs-title,.hljs-title.class_{color:#438288}.hljs-strong{font-weight:700;color:#438288}.hljs-addition,.hljs-code,.hljs-string,.hljs-title.class_.inherited__{color:#df0002}.hljs-built_in,.hljs-doctag,.hljs-keyword.hljs-atrule,.hljs-quote,.hljs-regexp{color:#00a0be}.hljs-attribute,.hljs-function .hljs-title,.hljs-section,.hljs-title.function_,.ruby .hljs-property{color:#790ead}.diff .hljs-meta,.hljs-keyword,.hljs-template-tag,.hljs-type{color:#b21889}.hljs-emphasis{color:#b21889;font-style:italic}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-meta .hljs-string{color:#c77c48}.hljs-meta .hljs-keyword,.hljs-meta-keyword{font-weight:700} -------------------------------------------------------------------------------- /Sources/Assets/styles/xcode.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#fff;color:#000}.xml .hljs-meta{color:silver}.hljs-comment,.hljs-quote{color:#007400}.hljs-attribute,.hljs-keyword,.hljs-literal,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#aa0d91}.hljs-template-variable,.hljs-variable{color:#3f6e74}.hljs-code,.hljs-meta-string,.hljs-string{color:#c41a16}.hljs-link,.hljs-regexp{color:#0e0eff}.hljs-bullet,.hljs-number,.hljs-symbol,.hljs-title{color:#1c00cf}.hljs-meta,.hljs-section{color:#643820}.hljs-built_in,.hljs-builtin-name,.hljs-class .hljs-title,.hljs-params,.hljs-type{color:#5c2699}.hljs-attr{color:#836c28}.hljs-subst{color:#000}.hljs-formula{background-color:#eee;font-style:italic}.hljs-addition{background-color:#baeeba}.hljs-deletion{background-color:#ffc8bd}.hljs-selector-class,.hljs-selector-id{color:#9b703f}.hljs-doctag,.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic} -------------------------------------------------------------------------------- /Sources/Assets/styles/xt256.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;color:#eaeaea;background:#000;padding:.5em}.hljs-subst{color:#eaeaea}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-builtin-name,.hljs-type{color:#eaeaea}.hljs-params{color:#da0000}.hljs-literal,.hljs-name,.hljs-number{color:#ff0000;font-weight:bolder}.hljs-comment{color:#969896}.hljs-quote,.hljs-selector-id{color:#0ff}.hljs-template-variable,.hljs-title,.hljs-variable{color:#0ff;font-weight:700}.hljs-keyword,.hljs-selector-class,.hljs-symbol{color:#fff000}.hljs-bullet,.hljs-string{color:#0f0}.hljs-section,.hljs-tag{color:#000fff}.hljs-selector-tag{color:#000fff;font-weight:700}.hljs-attribute,.hljs-built_in,.hljs-link,.hljs-regexp{color:#f0f}.hljs-meta{color:#fff;font-weight:bolder} -------------------------------------------------------------------------------- /Sources/Assets/styles/zenburn.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#3f3f3f;color:#dcdcdc}.hljs-keyword,.hljs-selector-tag,.hljs-tag{color:#e3ceab}.hljs-template-tag{color:#dcdcdc}.hljs-number{color:#8cd0d3}.hljs-attribute,.hljs-template-variable,.hljs-variable{color:#efdcbc}.hljs-literal{color:#efefaf}.hljs-subst{color:#8f8f8f}.hljs-name,.hljs-section,.hljs-selector-class,.hljs-selector-id,.hljs-title,.hljs-type{color:#efef8f}.hljs-bullet,.hljs-link,.hljs-symbol{color:#dca3a3}.hljs-built_in,.hljs-builtin-name,.hljs-deletion,.hljs-string{color:#cc9393}.hljs-addition,.hljs-comment,.hljs-meta,.hljs-quote{color:#7f9f7f}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} -------------------------------------------------------------------------------- /Sources/Highlighter/HTMLUtils.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Highlighter.swift 3 | * Copyright 2024, Tony Smith 4 | * Copyright 2016, Juan-Pablo Illanes 5 | * 6 | * Licence: MIT 7 | */ 8 | 9 | 10 | import Foundation 11 | 12 | 13 | /** 14 | Utility class for processing certain HTML entities. 15 | */ 16 | internal class HTMLUtils { 17 | 18 | /** 19 | Decode the HTML character entity to the corresponding Unicode character. 20 | 21 | Unicode character, return `nil` for invalid input. For example: 22 | 23 | * `decode("@")` returns `"@"` 24 | * `decode("€")` returns `"€"` 25 | * `decode("<")` returns `"<"` 26 | * `decode("&foo;")` returns `nil` 27 | 28 | - Parameters: 29 | - entity: The HTML entity code. 30 | 31 | - Returns: The entity as a Swift Character, or `nil` if it could not be decoded. 32 | */ 33 | class func decode(_ entity: String) -> Character? { 34 | 35 | if entity.lowercased().hasPrefix("&#x") { 36 | return decodeNumeric(String(entity[entity.index(entity.startIndex, offsetBy: 3)...]), base: 16) 37 | } else if entity.hasPrefix("&#") { 38 | return decodeNumeric(String(entity[entity.index(entity.startIndex, offsetBy: 2)...]), base: 10) 39 | } else { 40 | return characterEntities[entity] 41 | } 42 | } 43 | 44 | 45 | /** 46 | Decode a numerically encoded HTML character entity to the corresponding Unicode character. 47 | 48 | Unicode character, return `nil` for invalid input. For example: 49 | 50 | * `decodeNumeric("@")` returns `"@"`, 51 | * `decodeNumeric("€")` returns `"€"` 52 | 53 | - Parameters: 54 | - entityValue: The HTML entity numeric code. 55 | - base: The numeric base of the value. 56 | 57 | - Returns: The entity as a Swift Character, or `nil` if it could not be decoded. 58 | */ 59 | class func decodeNumeric(_ entityValue: String, base: Int32) -> Character? { 60 | 61 | let code: UInt32 = UInt32(strtoul(entityValue, nil, base)) 62 | return Character(UnicodeScalar(code)!) 63 | } 64 | 65 | } 66 | 67 | 68 | /** 69 | Dictionary of HTML entities and the characters they refer to. 70 | */ 71 | private let characterEntities: [String: Character] = [ 72 | 73 | // XML predefined entities 74 | """ : "\"", 75 | "&" : "&", 76 | "'" : "'", 77 | "<" : "<", 78 | ">" : ">", 79 | 80 | // HTML character entity references 81 | " " : "\u{00A0}", 82 | "¡" : "\u{00A1}", 83 | "¢" : "\u{00A2}", 84 | "£" : "\u{00A3}", 85 | "¤" : "\u{00A4}", 86 | "¥" : "\u{00A5}", 87 | "¦" : "\u{00A6}", 88 | "§" : "\u{00A7}", 89 | "¨" : "\u{00A8}", 90 | "©" : "\u{00A9}", 91 | "ª" : "\u{00AA}", 92 | "«" : "\u{00AB}", 93 | "¬" : "\u{00AC}", 94 | "­" : "\u{00AD}", 95 | "®" : "\u{00AE}", 96 | "¯" : "\u{00AF}", 97 | "°" : "\u{00B0}", 98 | "±" : "\u{00B1}", 99 | "²" : "\u{00B2}", 100 | "³" : "\u{00B3}", 101 | "´" : "\u{00B4}", 102 | "µ" : "\u{00B5}", 103 | "¶" : "\u{00B6}", 104 | "·" : "\u{00B7}", 105 | "¸" : "\u{00B8}", 106 | "¹" : "\u{00B9}", 107 | "º" : "\u{00BA}", 108 | "»" : "\u{00BB}", 109 | "¼" : "\u{00BC}", 110 | "½" : "\u{00BD}", 111 | "¾" : "\u{00BE}", 112 | "¿" : "\u{00BF}", 113 | "À" : "\u{00C0}", 114 | "Á" : "\u{00C1}", 115 | "Â" : "\u{00C2}", 116 | "Ã" : "\u{00C3}", 117 | "Ä" : "\u{00C4}", 118 | "Å" : "\u{00C5}", 119 | "Æ" : "\u{00C6}", 120 | "Ç" : "\u{00C7}", 121 | "È" : "\u{00C8}", 122 | "É" : "\u{00C9}", 123 | "Ê" : "\u{00CA}", 124 | "Ë" : "\u{00CB}", 125 | "Ì" : "\u{00CC}", 126 | "Í" : "\u{00CD}", 127 | "Î" : "\u{00CE}", 128 | "Ï" : "\u{00CF}", 129 | "Ð" : "\u{00D0}", 130 | "Ñ" : "\u{00D1}", 131 | "Ò" : "\u{00D2}", 132 | "Ó" : "\u{00D3}", 133 | "Ô" : "\u{00D4}", 134 | "Õ" : "\u{00D5}", 135 | "Ö" : "\u{00D6}", 136 | "×" : "\u{00D7}", 137 | "Ø" : "\u{00D8}", 138 | "Ù" : "\u{00D9}", 139 | "Ú" : "\u{00DA}", 140 | "Û" : "\u{00DB}", 141 | "Ü" : "\u{00DC}", 142 | "Ý" : "\u{00DD}", 143 | "Þ" : "\u{00DE}", 144 | "ß" : "\u{00DF}", 145 | "à" : "\u{00E0}", 146 | "á" : "\u{00E1}", 147 | "â" : "\u{00E2}", 148 | "ã" : "\u{00E3}", 149 | "ä" : "\u{00E4}", 150 | "å" : "\u{00E5}", 151 | "æ" : "\u{00E6}", 152 | "ç" : "\u{00E7}", 153 | "è" : "\u{00E8}", 154 | "é" : "\u{00E9}", 155 | "ê" : "\u{00EA}", 156 | "ë" : "\u{00EB}", 157 | "ì" : "\u{00EC}", 158 | "í" : "\u{00ED}", 159 | "î" : "\u{00EE}", 160 | "ï" : "\u{00EF}", 161 | "ð" : "\u{00F0}", 162 | "ñ" : "\u{00F1}", 163 | "ò" : "\u{00F2}", 164 | "ó" : "\u{00F3}", 165 | "ô" : "\u{00F4}", 166 | "õ" : "\u{00F5}", 167 | "ö" : "\u{00F6}", 168 | "÷" : "\u{00F7}", 169 | "ø" : "\u{00F8}", 170 | "ù" : "\u{00F9}", 171 | "ú" : "\u{00FA}", 172 | "û" : "\u{00FB}", 173 | "ü" : "\u{00FC}", 174 | "ý" : "\u{00FD}", 175 | "þ" : "\u{00FE}", 176 | "ÿ" : "\u{00FF}", 177 | "Œ" : "\u{0152}", 178 | "œ" : "\u{0153}", 179 | "Š" : "\u{0160}", 180 | "š" : "\u{0161}", 181 | "Ÿ" : "\u{0178}", 182 | "ƒ" : "\u{0192}", 183 | "ˆ" : "\u{02C6}", 184 | "˜" : "\u{02DC}", 185 | "Α" : "\u{0391}", 186 | "Β" : "\u{0392}", 187 | "Γ" : "\u{0393}", 188 | "Δ" : "\u{0394}", 189 | "Ε" : "\u{0395}", 190 | "Ζ" : "\u{0396}", 191 | "Η" : "\u{0397}", 192 | "Θ" : "\u{0398}", 193 | "Ι" : "\u{0399}", 194 | "Κ" : "\u{039A}", 195 | "Λ" : "\u{039B}", 196 | "Μ" : "\u{039C}", 197 | "Ν" : "\u{039D}", 198 | "Ξ" : "\u{039E}", 199 | "Ο" : "\u{039F}", 200 | "Π" : "\u{03A0}", 201 | "Ρ" : "\u{03A1}", 202 | "Σ" : "\u{03A3}", 203 | "Τ" : "\u{03A4}", 204 | "Υ" : "\u{03A5}", 205 | "Φ" : "\u{03A6}", 206 | "Χ" : "\u{03A7}", 207 | "Ψ" : "\u{03A8}", 208 | "Ω" : "\u{03A9}", 209 | "α" : "\u{03B1}", 210 | "β" : "\u{03B2}", 211 | "γ" : "\u{03B3}", 212 | "δ" : "\u{03B4}", 213 | "ε" : "\u{03B5}", 214 | "ζ" : "\u{03B6}", 215 | "η" : "\u{03B7}", 216 | "θ" : "\u{03B8}", 217 | "ι" : "\u{03B9}", 218 | "κ" : "\u{03BA}", 219 | "λ" : "\u{03BB}", 220 | "μ" : "\u{03BC}", 221 | "ν" : "\u{03BD}", 222 | "ξ" : "\u{03BE}", 223 | "ο" : "\u{03BF}", 224 | "π" : "\u{03C0}", 225 | "ρ" : "\u{03C1}", 226 | "ς" : "\u{03C2}", 227 | "σ" : "\u{03C3}", 228 | "τ" : "\u{03C4}", 229 | "υ" : "\u{03C5}", 230 | "φ" : "\u{03C6}", 231 | "χ" : "\u{03C7}", 232 | "ψ" : "\u{03C8}", 233 | "ω" : "\u{03C9}", 234 | "ϑ" : "\u{03D1}", 235 | "ϒ" : "\u{03D2}", 236 | "ϖ" : "\u{03D6}", 237 | " " : "\u{2002}", 238 | " " : "\u{2003}", 239 | " " : "\u{2009}", 240 | "‌" : "\u{200C}", 241 | "‍" : "\u{200D}", 242 | "‎" : "\u{200E}", 243 | "‏" : "\u{200F}", 244 | "–" : "\u{2013}", 245 | "—" : "\u{2014}", 246 | "‘" : "\u{2018}", 247 | "’" : "\u{2019}", 248 | "‚" : "\u{201A}", 249 | "“" : "\u{201C}", 250 | "”" : "\u{201D}", 251 | "„" : "\u{201E}", 252 | "†" : "\u{2020}", 253 | "‡" : "\u{2021}", 254 | "•" : "\u{2022}", 255 | "…" : "\u{2026}", 256 | "‰" : "\u{2030}", 257 | "′" : "\u{2032}", 258 | "″" : "\u{2033}", 259 | "‹" : "\u{2039}", 260 | "›" : "\u{203A}", 261 | "‾" : "\u{203E}", 262 | "⁄" : "\u{2044}", 263 | "€" : "\u{20AC}", 264 | "ℑ" : "\u{2111}", 265 | "℘" : "\u{2118}", 266 | "ℜ" : "\u{211C}", 267 | "™" : "\u{2122}", 268 | "ℵ" : "\u{2135}", 269 | "←" : "\u{2190}", 270 | "↑" : "\u{2191}", 271 | "→" : "\u{2192}", 272 | "↓" : "\u{2193}", 273 | "↔" : "\u{2194}", 274 | "↵" : "\u{21B5}", 275 | "⇐" : "\u{21D0}", 276 | "⇑" : "\u{21D1}", 277 | "⇒" : "\u{21D2}", 278 | "⇓" : "\u{21D3}", 279 | "⇔" : "\u{21D4}", 280 | "∀" : "\u{2200}", 281 | "∂" : "\u{2202}", 282 | "∃" : "\u{2203}", 283 | "∅" : "\u{2205}", 284 | "∇" : "\u{2207}", 285 | "∈" : "\u{2208}", 286 | "∉" : "\u{2209}", 287 | "∋" : "\u{220B}", 288 | "∏" : "\u{220F}", 289 | "∑" : "\u{2211}", 290 | "−" : "\u{2212}", 291 | "∗" : "\u{2217}", 292 | "√" : "\u{221A}", 293 | "∝" : "\u{221D}", 294 | "∞" : "\u{221E}", 295 | "∠" : "\u{2220}", 296 | "∧" : "\u{2227}", 297 | "∨" : "\u{2228}", 298 | "∩" : "\u{2229}", 299 | "∪" : "\u{222A}", 300 | "∫" : "\u{222B}", 301 | "∴" : "\u{2234}", 302 | "∼" : "\u{223C}", 303 | "≅" : "\u{2245}", 304 | "≈" : "\u{2248}", 305 | "≠" : "\u{2260}", 306 | "≡" : "\u{2261}", 307 | "≤" : "\u{2264}", 308 | "≥" : "\u{2265}", 309 | "⊂" : "\u{2282}", 310 | "⊃" : "\u{2283}", 311 | "⊄" : "\u{2284}", 312 | "⊆" : "\u{2286}", 313 | "⊇" : "\u{2287}", 314 | "⊕" : "\u{2295}", 315 | "⊗" : "\u{2297}", 316 | "⊥" : "\u{22A5}", 317 | "⋅" : "\u{22C5}", 318 | "⌈" : "\u{2308}", 319 | "⌉" : "\u{2309}", 320 | "⌊" : "\u{230A}", 321 | "⌋" : "\u{230B}", 322 | "⟨" : "\u{2329}", 323 | "⟩" : "\u{232A}", 324 | "◊" : "\u{25CA}", 325 | "♠" : "\u{2660}", 326 | "♣" : "\u{2663}", 327 | "♥" : "\u{2665}", 328 | "♦" : "\u{2666}" 329 | ] 330 | 331 | 332 | -------------------------------------------------------------------------------- /Sources/Highlighter/Highlighter.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Highlighter.swift 3 | * Copyright 2024, Tony Smith 4 | * Copyright 2016, Juan-Pablo Illanes 5 | * 6 | * Licence: MIT 7 | */ 8 | 9 | 10 | import Foundation 11 | import JavaScriptCore 12 | 13 | #if os(OSX) 14 | import AppKit 15 | #else 16 | import UIKit 17 | #endif 18 | 19 | 20 | /** 21 | Wrapper class for generating a highlighted NSAttributedString from a code string. 22 | */ 23 | open class Highlighter { 24 | 25 | // MARK: - Public Properties 26 | 27 | open var theme: Theme! { 28 | didSet { 29 | themeChanged?(theme) 30 | } 31 | } 32 | 33 | // This block will be called every time the theme changes. 34 | open var themeChanged: ((Theme) -> Void)? 35 | 36 | // When `true`, forces highlighting to finish even if illegal syntax is detected. 37 | open var ignoreIllegals = false 38 | 39 | 40 | // MARK: - Private Properties 41 | 42 | private let hljs: JSValue 43 | private let bundle: Bundle 44 | private let htmlStart: String = "<" 45 | private let spanStart: String = "span class=\"" 46 | private let spanStartClose: String = "\">" 47 | private let spanEnd: String = "/span>" 48 | private let htmlEscape: NSRegularExpression = try! NSRegularExpression(pattern: "&#?[a-zA-Z0-9]+?;", options: .caseInsensitive) 49 | 50 | 51 | // MARK: - Constructor 52 | 53 | /** 54 | The default initialiser. 55 | 56 | Returns `nil` on failure to load or evaluate `highlight.min.js`, 57 | or to load the default theme (`Default`) 58 | */ 59 | public init?() { 60 | 61 | // Get the library's bundle based on how it's 62 | // being included in the host app 63 | #if SWIFT_PACKAGE 64 | let bundle = Bundle.module 65 | #else 66 | let bundle = Bundle(for: Highlighter.self) 67 | #endif 68 | 69 | // Load the highlight.js code from the bundle or fail 70 | guard let highlightPath: String = bundle.path(forResource: "highlight.min", ofType: "js") else { 71 | return nil 72 | } 73 | 74 | // Check the JavaScript or fail 75 | let context = JSContext.init()! 76 | let highlightJs: String = try! String.init(contentsOfFile: highlightPath) 77 | let _ = context.evaluateScript(highlightJs) 78 | guard let hljs = context.globalObject.objectForKeyedSubscript("hljs") else { 79 | return nil 80 | } 81 | 82 | // Store the results for later 83 | self.hljs = hljs 84 | self.bundle = bundle 85 | 86 | // Check and set applying a theme or fail 87 | // NOTE 'setTheme()' depends on 'self.bundle' 88 | guard setTheme("default") else { 89 | return nil 90 | } 91 | } 92 | 93 | 94 | //MARK: - Primary Functions 95 | 96 | /** 97 | Highlight the supplied code in the specified language. 98 | 99 | - Parameters: 100 | - code: The source code to highlight. 101 | - languageName: The language in which the code is written. 102 | - doFastRender: Should fast rendering be used? Default: `true`. 103 | 104 | - Returns: The highlighted code as an NSAttributedString, or `nil` 105 | */ 106 | open func highlight(_ code: String, as languageName: String? = nil, doFastRender: Bool = true) -> NSAttributedString? { 107 | 108 | let returnValue: JSValue 109 | 110 | if let language = languageName { 111 | // Use the specified language 112 | // NOTE Will return 'undefined' (trapped below) if it's a unknown language 113 | let options: [String: Any] = ["language": language, "ignoreIllegals": self.ignoreIllegals] 114 | returnValue = hljs.invokeMethod("highlight", 115 | withArguments: [code, options]) 116 | } else { 117 | // Use language auto detection 118 | returnValue = hljs.invokeMethod("highlightAuto", 119 | withArguments: [code]) 120 | } 121 | 122 | // Check we got a valid string back - fail if we didn't 123 | let renderedHTMLValue: JSValue? = returnValue.objectForKeyedSubscript("value") 124 | guard var renderedHTMLString: String = renderedHTMLValue!.toString() else { 125 | return nil 126 | } 127 | 128 | // Trap 'undefined' output as this is effectively an error condition 129 | // and should not be returned as a valid result -- it's actually a fail 130 | if renderedHTMLString == "undefined" { 131 | return nil 132 | } 133 | 134 | // Convert the HTML received from Highlight.js to an NSAttributedString or nil 135 | var returnAttrString: NSAttributedString? = nil 136 | 137 | if doFastRender { 138 | // Use fast rendering -- the default 139 | returnAttrString = processHTMLString(renderedHTMLString)! 140 | } else { 141 | // Use NSAttributedString's own not-so-fast rendering 142 | renderedHTMLString = "
" + renderedHTMLString + "
" 143 | 144 | let data = renderedHTMLString.data(using: String.Encoding.utf8)! 145 | let options: [NSAttributedString.DocumentReadingOptionKey: Any] = [ 146 | .documentType: NSAttributedString.DocumentType.html, 147 | .characterEncoding: String.Encoding.utf8.rawValue 148 | ] 149 | 150 | // Execute on main thread 151 | // NOTE Not sure why, when we don't do this elsewhere 152 | safeMainSync 153 | { 154 | returnAttrString = try? NSMutableAttributedString(data:data, options: options, documentAttributes:nil) 155 | } 156 | } 157 | 158 | return returnAttrString 159 | } 160 | 161 | 162 | /** 163 | Set the Highligt.js theme to use for highlighting. 164 | 165 | - Parameters: 166 | - themeName: The Highlight.js theme's name. 167 | - withFont: The name of the font to use. Default: Courier. 168 | - ofSize: The size of the font. Default: 14pt. 169 | 170 | - Returns: Whether the theme was successfully applied (`true`) or not (`false`) 171 | */ 172 | @discardableResult 173 | open func setTheme(_ themeName: String, withFont: String? = nil, ofSize: CGFloat? = nil) -> Bool { 174 | 175 | // Make sure we can load the theme's CSS file -- or fail 176 | guard let themePath = self.bundle.path(forResource: themeName, ofType: "css") else { 177 | return false 178 | } 179 | 180 | // Create the required font 181 | // If this fails ('font' == nil), we use the defaults 182 | var font: HRFont? = nil 183 | if let fontName: String = withFont { 184 | var size: CGFloat = 14.0 185 | if ofSize != nil { 186 | size = ofSize! 187 | } 188 | 189 | font = HRFont.init(name: fontName, size: size) 190 | } 191 | 192 | // Get the theme CSS and instantiate a Theme object 193 | let themeString = try! String.init(contentsOfFile: themePath) 194 | self.theme = Theme.init(withTheme: themeString, usingFont: font) 195 | return true 196 | } 197 | 198 | 199 | /** 200 | Get a list of available Highlight.js themes. 201 | 202 | Just lists what CSS files are in the bundle. 203 | 204 | - Returns: The list of themes as an array of strings. 205 | */ 206 | open func availableThemes() -> [String] { 207 | 208 | let paths = bundle.paths(forResourcesOfType: "css", inDirectory: nil) as [NSString] 209 | var result = [String]() 210 | for path in paths { 211 | result.append(path.lastPathComponent.replacingOccurrences(of: ".css", with: "")) 212 | } 213 | 214 | return result 215 | } 216 | 217 | 218 | /** 219 | Get a list of languages supported by Highlight.js. 220 | 221 | - Returns: The list of languages as an array of strings. 222 | */ 223 | open func supportedLanguages() -> [String] { 224 | 225 | let res: JSValue? = hljs.invokeMethod("listLanguages", withArguments: []) 226 | return res!.toArray() as! [String] 227 | } 228 | 229 | 230 | // MARK: - Fast HTML Rendering Function 231 | 232 | /** 233 | Generate an NSAttributedString from HTML source. 234 | 235 | - Parameters: 236 | - htmlString: The HTML to be converted. 237 | 238 | - Returns: The rendered HTML as an NSAttibutedString, or `nil` if an error occurred. 239 | */ 240 | private func processHTMLString(_ htmlString: String) -> NSAttributedString? { 241 | 242 | let scanner: Scanner = Scanner(string: htmlString) 243 | scanner.charactersToBeSkipped = nil 244 | var scannedString: NSString? 245 | let resultString: NSMutableAttributedString = NSMutableAttributedString(string: "") 246 | var propStack: [String] = ["hljs"] 247 | 248 | while !scanner.isAtEnd { 249 | var ended: Bool = false 250 | if scanner.scanUpTo(self.htmlStart, 251 | into: &scannedString) { 252 | ended = scanner.isAtEnd 253 | } 254 | 255 | if scannedString != nil && scannedString!.length > 0 { 256 | let attrScannedString: NSAttributedString = self.theme.applyStyleToString(scannedString! as String, 257 | styleList: propStack) 258 | resultString.append(attrScannedString) 259 | 260 | if ended { 261 | continue 262 | } 263 | } 264 | 265 | scanner.scanLocation += 1 266 | 267 | let string: NSString = scanner.string as NSString 268 | let nextChar: String = string.substring(with: NSMakeRange(scanner.scanLocation, 1)) 269 | if nextChar == "s" { 270 | scanner.scanLocation += (self.spanStart as NSString).length 271 | scanner.scanUpTo(self.spanStartClose, into:&scannedString) 272 | scanner.scanLocation += (self.spanStartClose as NSString).length 273 | propStack.append(scannedString! as String) 274 | } else if nextChar == "/" { 275 | scanner.scanLocation += (self.spanEnd as NSString).length 276 | propStack.removeLast() 277 | } else { 278 | let attrScannedString: NSAttributedString = self.theme.applyStyleToString("<", styleList: propStack) 279 | resultString.append(attrScannedString) 280 | scanner.scanLocation += 1 281 | } 282 | 283 | scannedString = nil 284 | } 285 | 286 | let results: [NSTextCheckingResult] = self.htmlEscape.matches(in: resultString.string, 287 | options: [.reportCompletion], 288 | range: NSMakeRange(0, resultString.length)) 289 | var localOffset: Int = 0 290 | for result: NSTextCheckingResult in results { 291 | let fixedRange: NSRange = NSMakeRange(result.range.location - localOffset, result.range.length) 292 | let entity: String = (resultString.string as NSString).substring(with: fixedRange) 293 | if let decodedEntity = HTMLUtils.decode(entity) { 294 | resultString.replaceCharacters(in: fixedRange, with: String(decodedEntity)) 295 | localOffset += (result.range.length - 1); 296 | } 297 | } 298 | 299 | return resultString 300 | } 301 | 302 | 303 | // MARK:- Utility Functions 304 | 305 | /** 306 | Execute the supplied block on the main thread. 307 | */ 308 | private func safeMainSync(_ block: @escaping ()->()) { 309 | 310 | if Thread.isMainThread { 311 | block() 312 | } else { 313 | DispatchQueue.main.sync { 314 | block() 315 | } 316 | } 317 | } 318 | 319 | } 320 | 321 | 322 | /** 323 | Swap the paragraph style in all of the attributes of 324 | an NSMutableAttributedString. 325 | 326 | - Parameters: 327 | - paraStyle: The injected NSParagraphStyle. 328 | */ 329 | extension NSMutableAttributedString { 330 | 331 | func addParaStyle(with paraStyle: NSParagraphStyle) { 332 | beginEditing() 333 | self.enumerateAttribute(.paragraphStyle, in: NSMakeRange(0, self.length)) { (value, range, stop) in 334 | if let _ = value as? NSParagraphStyle { 335 | removeAttribute(.paragraphStyle, range: range) 336 | addAttribute(.paragraphStyle, value: paraStyle, range: range) 337 | } 338 | } 339 | endEditing() 340 | } 341 | } 342 | -------------------------------------------------------------------------------- /Sources/Highlighter/Shims.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Highlighter.swift 3 | * Copyright 2024, Tony Smith 4 | * Copyright 2016, Juan-Pablo Illanes 5 | * 6 | * Licence: MIT 7 | */ 8 | 9 | 10 | import Foundation 11 | 12 | /** 13 | Basic imports and typealiases. 14 | */ 15 | #if os(OSX) 16 | import AppKit 17 | public typealias HRColor = NSColor 18 | public typealias HRFont = NSFont 19 | #elseif os(iOS) 20 | import UIKit 21 | public typealias HRColor = UIColor 22 | public typealias HRFont = UIFont 23 | #endif 24 | 25 | 26 | /** 27 | Set type aliases according to which Swift is being run and, 28 | in the second case, if we're running on iOS 29 | 30 | NOTE This is probably unnecessary now since the Swift Package 31 | mandates Swift 5.3 32 | */ 33 | #if swift(>=4.2) 34 | public typealias AttributedStringKey = NSAttributedString.Key 35 | #else 36 | public typealias AttributedStringKey = NSAttributedStringKey 37 | #endif 38 | 39 | #if swift(>=4.2) && os(iOS) 40 | public typealias TextStorageEditActions = NSTextStorage.EditActions 41 | #else 42 | public typealias TextStorageEditActions = NSTextStorageEditActions 43 | #endif 44 | -------------------------------------------------------------------------------- /Sources/Highlighter/Theme.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Highlighter.swift 3 | * Copyright 2024, Tony Smith 4 | * Copyright 2016, Juan-Pablo Illanes 5 | * 6 | * Licence: MIT 7 | */ 8 | 9 | 10 | import Foundation 11 | 12 | #if os(OSX) 13 | import AppKit 14 | #elseif os(iOS) 15 | import UIKit 16 | #endif 17 | 18 | /** 19 | Typealiases 20 | */ 21 | private typealias HRThemeDict = [String: [AnyHashable: AnyObject]] 22 | private typealias HRThemeStringDict = [String: [String: String]] 23 | 24 | 25 | /** 26 | Class representing HighlightSwift's interal storage of a processed Highlight.js theme. 27 | */ 28 | open class Theme { 29 | 30 | // MARK:- Public Properties 31 | internal let theme: String 32 | internal var lightTheme: String! 33 | 34 | open var codeFont: HRFont! 35 | open var boldCodeFont: HRFont! 36 | open var italicCodeFont: HRFont! 37 | open var themeBackgroundColour: HRColor! 38 | // FROM 1.1.3 39 | open var lineSpacing: CGFloat = 0.0 40 | open var paraSpacing: CGFloat = 0.0 41 | 42 | // MARK:- Private Properties 43 | private var themeDict : HRThemeDict! 44 | private var strippedTheme : HRThemeStringDict! 45 | 46 | 47 | // MARK:- Constructor 48 | 49 | /** 50 | The default initialiser. 51 | 52 | - Parameters: 53 | - withTheme: The name of the Highlight.js theme to use. Default: `Default`. 54 | - usingFont: Optionally, a UIFont or NSFont to apply to the theme. Default: Courier @ 14pt. 55 | */ 56 | init(withTheme: String = "default", usingFont: HRFont? = nil) { 57 | 58 | // Record the theme name 59 | self.theme = withTheme 60 | 61 | // Apply the font choice 62 | if let font: HRFont = usingFont { 63 | setCodeFont(font) 64 | } else if let font = HRFont(name: "courier", size: 14.0) { 65 | setCodeFont(font) 66 | } else { 67 | // Just in case Courier has been deleted... 68 | setCodeFont(HRFont.systemFont(ofSize: 14.0)) 69 | } 70 | 71 | // Generate and store the theme variants 72 | self.strippedTheme = stripTheme(self.theme) 73 | self.lightTheme = strippedThemeToString(self.strippedTheme) 74 | self.themeDict = strippedThemeToTheme(self.strippedTheme) 75 | 76 | // Determine the theme's background colour as a hex string 77 | var backgroundColourHex: String? = self.strippedTheme[".hljs"]?["background"] 78 | if backgroundColourHex == nil { 79 | backgroundColourHex = self.strippedTheme[".hljs"]?["background-color"] 80 | } 81 | 82 | // Convert the hex to a UIColor or NSColor 83 | if let bgColourHex = backgroundColourHex { 84 | self.themeBackgroundColour = colourFromHexString(bgColourHex) 85 | } else { 86 | // Set a generic (light) background 87 | self.themeBackgroundColour = HRColor.white 88 | } 89 | } 90 | 91 | 92 | // MARK:- Getters and Setters 93 | 94 | /** 95 | Change the theme's font. 96 | 97 | This will automatically populate bold and italic variants of the specified font. 98 | 99 | - Parameters: 100 | - font: The UIFont or NSFont to use. 101 | */ 102 | open func setCodeFont(_ font: HRFont) { 103 | 104 | // Store the primary font choice 105 | self.codeFont = font 106 | 107 | // Generate the bold and italic variants 108 | #if os(iOS) || os(tvOS) 109 | let boldDescriptor = UIFontDescriptor(fontAttributes: [UIFontDescriptor.AttributeName.family:font.familyName, 110 | UIFontDescriptor.AttributeName.face:"Bold"]) 111 | let italicDescriptor = UIFontDescriptor(fontAttributes: [UIFontDescriptor.AttributeName.family:font.familyName, 112 | UIFontDescriptor.AttributeName.face:"Italic"]) 113 | let obliqueDescriptor = UIFontDescriptor(fontAttributes: [UIFontDescriptor.AttributeName.family:font.familyName, 114 | UIFontDescriptor.AttributeName.face:"Oblique"]) 115 | #else 116 | let boldDescriptor = NSFontDescriptor(fontAttributes: [.family:font.familyName!, 117 | .face:"Bold"]) 118 | let italicDescriptor = NSFontDescriptor(fontAttributes: [.family:font.familyName!, 119 | .face:"Italic"]) 120 | let obliqueDescriptor = NSFontDescriptor(fontAttributes: [.family:font.familyName!, 121 | .face:"Oblique"]) 122 | #endif 123 | 124 | self.boldCodeFont = HRFont(descriptor: boldDescriptor, size: font.pointSize) 125 | self.italicCodeFont = HRFont(descriptor: italicDescriptor, size: font.pointSize) 126 | 127 | if (self.italicCodeFont == nil || self.italicCodeFont.familyName != font.familyName) { 128 | self.italicCodeFont = HRFont(descriptor: obliqueDescriptor, size: font.pointSize) 129 | } 130 | 131 | if (self.italicCodeFont == nil) { 132 | self.italicCodeFont = font 133 | } 134 | 135 | if (self.boldCodeFont == nil) { 136 | self.boldCodeFont = font 137 | } 138 | 139 | if (self.themeDict != nil) { 140 | self.themeDict = strippedThemeToTheme(self.strippedTheme) 141 | } 142 | } 143 | 144 | 145 | // MARK:- Private Functions 146 | 147 | /** 148 | Convert a string to an NSAttributedString styled using the theme. 149 | 150 | Automatically applies the theme's font. 151 | 152 | - Parameters: 153 | - string: The source code string. 154 | - styleList: An array of attribute keys (strings). 155 | 156 | - Returns: The styled text as an NSAttributedString. 157 | */ 158 | internal func applyStyleToString(_ string: String, styleList: [String]) -> NSAttributedString { 159 | 160 | let returnString: NSAttributedString 161 | 162 | // FROM 1.1.3 163 | // Incorporate 164 | let spacedParaStyle: NSMutableParagraphStyle = NSMutableParagraphStyle.init() 165 | spacedParaStyle.lineSpacing = (self.lineSpacing >= 0.0 ? self.lineSpacing : 0.0) 166 | spacedParaStyle.paragraphSpacing = (self.paraSpacing >= 0.0 ? self.paraSpacing : 0.0) 167 | 168 | if styleList.count > 0 { 169 | // Build the attributes from the style list, including the font 170 | var attrs = [AttributedStringKey: Any]() 171 | attrs[.font] = self.codeFont 172 | attrs[.paragraphStyle] = spacedParaStyle 173 | for style in styleList { 174 | if let themeStyle = self.themeDict[style] as? [AttributedStringKey: Any] { 175 | for (attrName, attrValue) in themeStyle { 176 | attrs.updateValue(attrValue, forKey: attrName) 177 | } 178 | } 179 | } 180 | 181 | returnString = NSAttributedString(string: string, attributes:attrs) 182 | } else { 183 | // No specified attributes? Just set the font 184 | returnString = NSAttributedString(string: string, 185 | attributes:[.font: codeFont as Any, 186 | .paragraphStyle: spacedParaStyle]) 187 | } 188 | 189 | return returnString 190 | } 191 | 192 | /** 193 | Convert a Highlight.js theme's CSS to the class' string dictionary. 194 | 195 | - Parameters: 196 | - themeString: The theme's CSS string. 197 | 198 | - Returns: A dictionary of styles and values. 199 | */ 200 | private func stripTheme(_ themeString : String) -> HRThemeStringDict { 201 | 202 | let objcString: NSString = (themeString as NSString) 203 | let cssRegex = try! NSRegularExpression(pattern: "(?:(\\.[a-zA-Z0-9\\-_]*(?:[, ]\\.[a-zA-Z0-9\\-_]*)*)\\{([^\\}]*?)\\})", 204 | options:[.caseInsensitive]) 205 | let results = cssRegex.matches(in: themeString, 206 | options: [.reportCompletion], 207 | range: NSMakeRange(0, objcString.length)) 208 | var resultDict = [String: [String: String]]() 209 | 210 | for result in results { 211 | if result.numberOfRanges == 3 { 212 | var attributes = [String:String]() 213 | let cssPairs = objcString.substring(with: result.range(at: 2)).components(separatedBy: ";") 214 | for pair in cssPairs { 215 | let cssPropComp = pair.components(separatedBy: ":") 216 | if (cssPropComp.count == 2) { 217 | attributes[cssPropComp[0]] = cssPropComp[1] 218 | } 219 | } 220 | 221 | if attributes.count > 0 { 222 | // Check if we're adding attributes to an existing hljs key 223 | if resultDict[objcString.substring(with: result.range(at: 1))] != nil { 224 | // We have the key already so merge in the latest attribute dictionary 225 | let existingAttributes: [String: String] = resultDict[objcString.substring(with: result.range(at: 1))]! 226 | resultDict[objcString.substring(with: result.range(at: 1))] = existingAttributes.merging(attributes, uniquingKeysWith: { (first, _) in first }) 227 | } else { 228 | // Set the attributes to a new key 229 | resultDict[objcString.substring(with: result.range(at: 1))] = attributes 230 | } 231 | } 232 | } 233 | } 234 | 235 | var returnDict = [String: [String: String]]() 236 | for (keys, result) in resultDict { 237 | let keyArray = keys.replacingOccurrences(of: " ", with: ",").components(separatedBy: ",") 238 | for key in keyArray { 239 | var props : [String: String]? 240 | props = returnDict[key] 241 | if props == nil { 242 | props = [String:String]() 243 | } 244 | 245 | for (pName, pValue) in result { 246 | props!.updateValue(pValue, forKey: pName) 247 | } 248 | 249 | returnDict[key] = props! 250 | } 251 | } 252 | 253 | return returnDict 254 | } 255 | 256 | 257 | /** 258 | Convert an instance's string dictionary to a CSS string. 259 | 260 | - Parameters: 261 | - themeStringDict: The dictionary of styles and values. 262 | 263 | - Returns: CSS code as a string. 264 | */ 265 | private func strippedThemeToString(_ themeStringDict: HRThemeStringDict) -> String { 266 | 267 | var resultString: String = "" 268 | for (key, props) in themeStringDict { 269 | resultString += (key + "{") 270 | for (cssProp, val) in props { 271 | if key != ".hljs" || (cssProp.lowercased() != "background-color" && cssProp.lowercased() != "background") { 272 | resultString += "\(cssProp):\(val);" 273 | } 274 | } 275 | 276 | resultString += "}" 277 | } 278 | 279 | return resultString 280 | } 281 | 282 | 283 | /** 284 | Convert in instance's string dictionary to base dictionary. 285 | 286 | - Parameters: 287 | - themeStringDict: The dictionary of styles and values. 288 | 289 | - Returns: The base dictionary. 290 | */ 291 | private func strippedThemeToTheme(_ themeStringDict: HRThemeStringDict) -> HRThemeDict { 292 | 293 | var returnTheme = HRThemeDict() 294 | for (className, props) in themeStringDict { 295 | var keyProps = [AttributedStringKey: AnyObject]() 296 | for (key, prop) in props { 297 | switch key { 298 | case "color": 299 | keyProps[attributeForCSSKey(key)] = colourFromHexString(prop) 300 | case "font-style": 301 | keyProps[attributeForCSSKey(key)] = fontForCSSStyle(prop) 302 | case "font-weight": 303 | keyProps[attributeForCSSKey(key)] = fontForCSSStyle(prop) 304 | case "background-color": 305 | keyProps[attributeForCSSKey(key)] = colourFromHexString(prop) 306 | default: 307 | break 308 | } 309 | } 310 | 311 | if keyProps.count > 0 { 312 | let key: String = className.replacingOccurrences(of: ".", with: "") 313 | returnTheme[key] = keyProps 314 | } 315 | } 316 | 317 | return returnTheme 318 | } 319 | 320 | 321 | /** 322 | Get font information from a CSS string and use it to generate a font object. 323 | 324 | - Parameters: 325 | - fontStyle: The CSS font definition. 326 | 327 | - Returns: A UIFont or NSFont. 328 | */ 329 | internal func fontForCSSStyle(_ fontStyle: String) -> HRFont { 330 | 331 | switch fontStyle { 332 | case "bold", "bolder", "600", "700", "800", "900": 333 | return self.boldCodeFont 334 | case "italic", "oblique": 335 | return self.italicCodeFont 336 | default: 337 | return self.codeFont 338 | } 339 | } 340 | 341 | 342 | /** 343 | Emit an AttributedString key based on the a style key from a CSS file. 344 | 345 | - Parameters: 346 | - key: The CSS attribute key. 347 | 348 | - Returns: The NSAttributedString key. 349 | */ 350 | internal func attributeForCSSKey(_ key: String) -> AttributedStringKey { 351 | 352 | switch key { 353 | case "color": 354 | return .foregroundColor 355 | case "font-weight": 356 | return .font 357 | case "font-style": 358 | return .font 359 | case "background-color": 360 | return .backgroundColor 361 | default: 362 | return .font 363 | } 364 | } 365 | 366 | /** 367 | Emit a colour object to match a hex string or CSS colour identifiier. 368 | 369 | Identifiers supported: 370 | 371 | * `white` 372 | * `black` 373 | * `red` 374 | * `green` 375 | * `blue` 376 | * `navy` 377 | * `silver` 378 | 379 | Unknown colour identifiers default to grey. 380 | 381 | - Parameters: 382 | - colourValue: The CSS colour specification. 383 | 384 | - Returns: A UIColor or NSColor. 385 | */ 386 | internal func colourFromHexString(_ colourValue: String) -> HRColor { 387 | 388 | var colourString: String = colourValue.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) 389 | 390 | if (colourString.hasPrefix("#")) { 391 | // The colour is defined by a hex value 392 | colourString = (colourString as NSString).substring(from: 1) 393 | } else { 394 | switch colourString { 395 | case "white": 396 | return HRColor.init(white: 1.0, alpha: 1.0) 397 | case "black": 398 | return HRColor.init(white: 0.0, alpha: 1.0) 399 | case "red": 400 | return HRColor.init(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0) 401 | case "green": 402 | return HRColor.init(red: 0.0, green: 0.5, blue: 0.0, alpha: 1.0) 403 | case "blue": 404 | return HRColor.init(red: 0.0, green: 0.0, blue: 1.0, alpha: 1.0) 405 | case "navy": 406 | return HRColor.init(red: 0.0, green: 0.0, blue: 0.5, alpha: 1.0) 407 | case "silver": 408 | return HRColor.init(red: 0.75, green: 0.75, blue: 0.75, alpha: 1.0) 409 | default: 410 | return HRColor.gray 411 | } 412 | } 413 | 414 | // Colours in hex strings have 3, 6 or 8 (6 + alpha) values 415 | if colourString.count != 8 && colourString.count != 6 && colourString.count != 3 { 416 | return HRColor.gray 417 | } 418 | 419 | var r: UInt64 = 0, g: UInt64 = 0, b: UInt64 = 0, a: UInt64 = 0 420 | var divisor: CGFloat 421 | var alpha: CGFloat = 1.0 422 | 423 | if colourString.count == 6 || colourString.count == 8 { 424 | // Decode a six-character hex string 425 | let rString: String = (colourString as NSString).substring(to: 2) 426 | let gString: String = ((colourString as NSString).substring(from: 2) as NSString).substring(to: 2) 427 | let bString: String = ((colourString as NSString).substring(from: 4) as NSString).substring(to: 2) 428 | 429 | Scanner(string: rString).scanHexInt64(&r) 430 | Scanner(string: gString).scanHexInt64(&g) 431 | Scanner(string: bString).scanHexInt64(&b) 432 | 433 | divisor = 255.0 434 | 435 | if colourString.count == 8 { 436 | // Decode the eight-character hex string's alpha value 437 | let aString: String = ((colourString as NSString).substring(from: 6) as NSString).substring(to: 2) 438 | Scanner(string: aString).scanHexInt64(&a) 439 | alpha = CGFloat(a) / divisor 440 | } 441 | } else { 442 | // Decode a three-character hex string 443 | let rString: String = (colourString as NSString).substring(to: 1) 444 | let gString: String = ((colourString as NSString).substring(from: 1) as NSString).substring(to: 1) 445 | let bString: String = ((colourString as NSString).substring(from: 2) as NSString).substring(to: 1) 446 | 447 | Scanner(string: rString).scanHexInt64(&r) 448 | Scanner(string: gString).scanHexInt64(&g) 449 | Scanner(string: bString).scanHexInt64(&b) 450 | 451 | divisor = 15.0 452 | } 453 | 454 | return HRColor(red: CGFloat(r) / divisor, green: CGFloat(g) / divisor, blue: CGFloat(b) / divisor, alpha: alpha) 455 | } 456 | } 457 | -------------------------------------------------------------------------------- /Tests/HighlighterTests/HighlighterTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import Highlighter 3 | 4 | final class HighlighterTests: XCTestCase { 5 | 6 | var hr: Highlighter? = nil 7 | 8 | 9 | override func setUp() { 10 | 11 | self.hr = Highlighter.init() 12 | XCTAssert(hr != nil) 13 | } 14 | 15 | 16 | func testBadLanguage() { 17 | 18 | // Test trapping of a bad language name 19 | 20 | let result: NSAttributedString? = self.hr!.highlight("", as: "fintlewoodlewix@1") 21 | XCTAssert(result == nil) 22 | } 23 | 24 | 25 | func testSetThemeBad() { 26 | 27 | // Test trapping of a bad theme name 28 | 29 | let result: Bool = self.hr!.setTheme("fintlewoodlewix@1") 30 | XCTAssert(!result) 31 | } 32 | 33 | 34 | func testSetThemeDefaultFont() { 35 | 36 | let _ = self.hr!.setTheme("agate") 37 | let font: NSFont = self.hr!.theme.codeFont 38 | XCTAssert(font.fontName == "Courier" && font.pointSize == 14.0) 39 | } 40 | 41 | 42 | func testAvailableThemes() { 43 | 44 | // Test Highlight.js contains at least one theme 45 | 46 | let result: [String] = self.hr!.availableThemes() 47 | XCTAssert(result.count > 0) 48 | } 49 | 50 | 51 | func testSupportedLanguages() { 52 | 53 | // Test Highlight.js supports at least one language 54 | 55 | let result: [String] = self.hr!.supportedLanguages() 56 | XCTAssert(result.count > 0) 57 | } 58 | 59 | 60 | func testColourFromHexStringGood() { 61 | 62 | // Test colour decoding -- all should be processed as valid colours 63 | 64 | // Six-digit RGB 65 | var result: NSColor = self.hr!.theme.colourFromHexString("#808000") 66 | XCTAssert(result.redComponent > 0.49 && 67 | result.redComponent < 0.56 && 68 | result.greenComponent > 0.49 && 69 | result.greenComponent < 0.56 && 70 | result.blueComponent == 0.0 71 | ) 72 | 73 | // Three-digit RGB 74 | result = self.hr!.theme.colourFromHexString("#444") 75 | XCTAssert(result.redComponent > 0.2 && 76 | result.redComponent < 0.29 && 77 | result.blueComponent > 0.2 && 78 | result.greenComponent < 0.29 && 79 | result.blueComponent > 0.2 && 80 | result.blueComponent < 0.29 81 | ) 82 | 83 | // Eight-digit RGB + Alpha 84 | result = self.hr!.theme.colourFromHexString("#80800080") 85 | XCTAssert(result.alphaComponent > 0.49 && 86 | result.alphaComponent < 0.56 87 | ) 88 | 89 | // CSS entity 90 | result = self.hr!.theme.colourFromHexString("red") 91 | XCTAssert(result.redComponent == 1.0 && 92 | result.blueComponent == 0.0 && 93 | result.greenComponent == 0.0 94 | ) 95 | } 96 | 97 | 98 | func testColourFromHexStringBad() { 99 | 100 | // Test colour decoding -- all should be trapped as bad colours 101 | 102 | // Unknown CSS entity 103 | var result = self.hr!.theme.colourFromHexString("olive") 104 | XCTAssert(result == NSColor.gray) 105 | 106 | // Bad hex value 1 107 | result = self.hr!.theme.colourFromHexString("#ZZZ") 108 | XCTAssert(result.redComponent == 0.0 && 109 | result.blueComponent == 0.0 && 110 | result.greenComponent == 0.0 111 | ) 112 | 113 | // Bad hex value 2 114 | result = self.hr!.theme.colourFromHexString("#aaaaa") 115 | XCTAssert(result == NSColor.gray) 116 | } 117 | 118 | } 119 | -------------------------------------------------------------------------------- /hs.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /hs.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | --------------------------------------------------------------------------------