From 3aaebdbd7eb68ea8c483fa8e9c6dac3a02855319 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Tue, 18 Jun 2024 14:17:13 -0700 Subject: [PATCH] content: Implement Pygments Monokai, for upcoming dark theme For dark theme, web currently uses a mix of Pygments Monokai and Pygments Default. Mixing in Pygments Default seems accidental, so here we just use pure Pygments Monokai. Discussion: https://chat.zulip.org/#narrow/stream/431-redesign-project/topic/code.20span.20colors/near/1832283 LICENSE and AUTHORS files downloaded from: https://github.com/pygments/pygments/blob/f64833d9d/LICENSE https://github.com/pygments/pygments/blob/f64833d9d/AUTHORS (I've included AUTHORS because LICENSE refers to it.) Fixes: #749 Related: #95 --- assets/Pygments/AUTHORS.txt | 283 ++++++++++++++++++++++++++++++++++++ assets/Pygments/LICENSE.txt | 25 ++++ lib/licenses.dart | 10 ++ lib/widgets/code_block.dart | 255 +++++++++++++++++++++++++++++++- pubspec.yaml | 2 + 5 files changed, 574 insertions(+), 1 deletion(-) create mode 100644 assets/Pygments/AUTHORS.txt create mode 100644 assets/Pygments/LICENSE.txt diff --git a/assets/Pygments/AUTHORS.txt b/assets/Pygments/AUTHORS.txt new file mode 100644 index 0000000000..4ec64ba1ef --- /dev/null +++ b/assets/Pygments/AUTHORS.txt @@ -0,0 +1,283 @@ +Pygments is written and maintained by Georg Brandl . + +Major developers are Tim Hatch and Armin Ronacher +. + +Other contributors, listed alphabetically, are: + +* Sam Aaron -- Ioke lexer +* Jean Abou Samra -- LilyPond lexer +* João Abecasis -- JSLT lexer +* Ali Afshar -- image formatter +* Thomas Aglassinger -- Easytrieve, JCL, Rexx, Transact-SQL and VBScript + lexers +* Maxence Ahlouche -- PostgreSQL Explain lexer +* Muthiah Annamalai -- Ezhil lexer +* Nikolay Antipov -- OpenSCAD lexer +* Kumar Appaiah -- Debian control lexer +* Andreas Amann -- AppleScript lexer +* Timothy Armstrong -- Dart lexer fixes +* Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers +* Eiríkr Åsheim -- Uxntal lexer +* Jeremy Ashkenas -- CoffeeScript lexer +* José Joaquín Atria -- Praat lexer +* Stefan Matthias Aust -- Smalltalk lexer +* Lucas Bajolet -- Nit lexer +* Ben Bangert -- Mako lexers +* Max Battcher -- Darcs patch lexer +* Thomas Baruchel -- APL lexer +* Tim Baumann -- (Literate) Agda lexer +* Paul Baumgart, 280 North, Inc. -- Objective-J lexer +* Michael Bayer -- Myghty lexers +* Thomas Beale -- Archetype lexers +* John Benediktsson -- Factor lexer +* David Benjamin, Google LLC -- TLS lexer +* Trevor Bergeron -- mIRC formatter +* Vincent Bernat -- LessCSS lexer +* Christopher Bertels -- Fancy lexer +* Sébastien Bigaret -- QVT Operational lexer +* Jarrett Billingsley -- MiniD lexer +* Adam Blinkinsop -- Haskell, Redcode lexers +* Stéphane Blondon -- Procfile, SGF and Sieve lexers +* Frits van Bommel -- assembler lexers +* Pierre Bourdon -- bugfixes +* Martijn Braam -- Kernel log lexer, BARE lexer +* Matthias Bussonnier -- ANSI style handling for terminal-256 formatter +* chebee7i -- Python traceback lexer improvements +* Hiram Chirino -- Scaml and Jade lexers +* Mauricio Caceres -- SAS and Stata lexers. +* Michael Camilleri, John Gabriele, sogaiu -- Janet lexer +* Ian Cooper -- VGL lexer +* David Corbett -- Inform, Jasmin, JSGF, Snowball, and TADS 3 lexers +* Leaf Corcoran -- MoonScript lexer +* Gabriel Corona -- ASN.1 lexer +* Christopher Creutzig -- MuPAD lexer +* Daniël W. Crompton -- Pike lexer +* Pete Curry -- bugfixes +* Bryan Davis -- EBNF lexer +* Bruno Deferrari -- Shen lexer +* Walter Dörwald -- UL4 lexer +* Luke Drummond -- Meson lexer +* Giedrius Dubinskas -- HTML formatter improvements +* Owen Durni -- Haxe lexer +* Alexander Dutton, Oxford University Computing Services -- SPARQL lexer +* James Edwards -- Terraform lexer +* Nick Efford -- Python 3 lexer +* Sven Efftinge -- Xtend lexer +* Artem Egorkine -- terminal256 formatter +* Matthew Fernandez -- CAmkES lexer +* Paweł Fertyk -- GDScript lexer, HTML formatter improvements +* Michael Ficarra -- CPSA lexer +* James H. Fisher -- PostScript lexer +* William S. Fulton -- SWIG lexer +* Carlos Galdino -- Elixir and Elixir Console lexers +* Michael Galloy -- IDL lexer +* Naveen Garg -- Autohotkey lexer +* Simon Garnotel -- FreeFem++ lexer +* Laurent Gautier -- R/S lexer +* Alex Gaynor -- PyPy log lexer +* Richard Gerkin -- Igor Pro lexer +* Alain Gilbert -- TypeScript lexer +* Alex Gilding -- BlitzBasic lexer +* GitHub, Inc -- DASM16, Augeas, TOML, and Slash lexers +* Bertrand Goetzmann -- Groovy lexer +* Krzysiek Goj -- Scala lexer +* Rostyslav Golda -- FloScript lexer +* Andrey Golovizin -- BibTeX lexers +* Matt Good -- Genshi, Cheetah lexers +* Michał Górny -- vim modeline support +* Alex Gosse -- TrafficScript lexer +* Patrick Gotthardt -- PHP namespaces support +* Hubert Gruniaux -- C and C++ lexer improvements +* Olivier Guibe -- Asymptote lexer +* Phil Hagelberg -- Fennel lexer +* Florian Hahn -- Boogie lexer +* Martin Harriman -- SNOBOL lexer +* Matthew Harrison -- SVG formatter +* Steven Hazel -- Tcl lexer +* Dan Michael Heggø -- Turtle lexer +* Aslak Hellesøy -- Gherkin lexer +* Greg Hendershott -- Racket lexer +* Justin Hendrick -- ParaSail lexer +* Jordi Gutiérrez Hermoso -- Octave lexer +* David Hess, Fish Software, Inc. -- Objective-J lexer +* Ken Hilton -- Typographic Number Theory and Arrow lexers +* Varun Hiremath -- Debian control lexer +* Rob Hoelz -- Perl 6 lexer +* Doug Hogan -- Mscgen lexer +* Ben Hollis -- Mason lexer +* Max Horn -- GAP lexer +* Fred Hornsey -- OMG IDL Lexer +* Alastair Houghton -- Lexer inheritance facility +* Tim Howard -- BlitzMax lexer +* Dustin Howett -- Logos lexer +* Ivan Inozemtsev -- Fantom lexer +* Hiroaki Itoh -- Shell console rewrite, Lexers for PowerShell session, + MSDOS session, BC, WDiff +* Brian R. Jackson -- Tea lexer +* Christian Jann -- ShellSession lexer +* Jonas Camillus Jeppesen -- Line numbers and line highlighting for + RTF-formatter +* Dennis Kaarsemaker -- sources.list lexer +* Dmitri Kabak -- Inferno Limbo lexer +* Igor Kalnitsky -- vhdl lexer +* Colin Kennedy - USD lexer +* Alexander Kit -- MaskJS lexer +* Pekka Klärck -- Robot Framework lexer +* Gerwin Klein -- Isabelle lexer +* Eric Knibbe -- Lasso lexer +* Stepan Koltsov -- Clay lexer +* Oliver Kopp - Friendly grayscale style +* Adam Koprowski -- Opa lexer +* Benjamin Kowarsch -- Modula-2 lexer +* Domen Kožar -- Nix lexer +* Oleh Krekel -- Emacs Lisp lexer +* Alexander Kriegisch -- Kconfig and AspectJ lexers +* Marek Kubica -- Scheme lexer +* Jochen Kupperschmidt -- Markdown processor +* Gerd Kurzbach -- Modelica lexer +* Jon Larimer, Google Inc. -- Smali lexer +* Olov Lassus -- Dart lexer +* Matt Layman -- TAP lexer +* Kristian Lyngstøl -- Varnish lexers +* Sylvestre Ledru -- Scilab lexer +* Chee Sing Lee -- Flatline lexer +* Mark Lee -- Vala lexer +* Thomas Linder Puls -- Visual Prolog lexer +* Pete Lomax -- Phix lexer +* Valentin Lorentz -- C++ lexer improvements +* Ben Mabey -- Gherkin lexer +* Angus MacArthur -- QML lexer +* Louis Mandel -- X10 lexer +* Louis Marchand -- Eiffel lexer +* Simone Margaritelli -- Hybris lexer +* Tim Martin - World of Warcraft TOC lexer +* Kirk McDonald -- D lexer +* Gordon McGregor -- SystemVerilog lexer +* Stephen McKamey -- Duel/JBST lexer +* Brian McKenna -- F# lexer +* Charles McLaughlin -- Puppet lexer +* Kurt McKee -- Tera Term macro lexer, PostgreSQL updates, MySQL overhaul, JSON lexer +* Joe Eli McIlvain -- Savi lexer +* Lukas Meuser -- BBCode formatter, Lua lexer +* Cat Miller -- Pig lexer +* Paul Miller -- LiveScript lexer +* Hong Minhee -- HTTP lexer +* Michael Mior -- Awk lexer +* Bruce Mitchener -- Dylan lexer rewrite +* Reuben Morais -- SourcePawn lexer +* Jon Morton -- Rust lexer +* Paulo Moura -- Logtalk lexer +* Mher Movsisyan -- DTD lexer +* Dejan Muhamedagic -- Crmsh lexer +* Adrien Nayrat -- PostgreSQL Explain lexer +* Ana Nelson -- Ragel, ANTLR, R console lexers +* David Neto, Google LLC -- WebGPU Shading Language lexer +* Kurt Neufeld -- Markdown lexer +* Nam T. Nguyen -- Monokai style +* Jesper Noehr -- HTML formatter "anchorlinenos" +* Mike Nolta -- Julia lexer +* Avery Nortonsmith -- Pointless lexer +* Jonas Obrist -- BBCode lexer +* Edward O'Callaghan -- Cryptol lexer +* David Oliva -- Rebol lexer +* Pat Pannuto -- nesC lexer +* Jon Parise -- Protocol buffers and Thrift lexers +* Benjamin Peterson -- Test suite refactoring +* Ronny Pfannschmidt -- BBCode lexer +* Dominik Picheta -- Nimrod lexer +* Andrew Pinkham -- RTF Formatter Refactoring +* Clément Prévost -- UrbiScript lexer +* Tanner Prynn -- cmdline -x option and loading lexers from files +* Oleh Prypin -- Crystal lexer (based on Ruby lexer) +* Nick Psaris -- K and Q lexers +* Xidorn Quan -- Web IDL lexer +* Elias Rabel -- Fortran fixed form lexer +* raichoo -- Idris lexer +* Daniel Ramirez -- GDScript lexer +* Kashif Rasul -- CUDA lexer +* Nathan Reed -- HLSL lexer +* Justin Reidy -- MXML lexer +* Jonathon Reinhart, Google LLC -- Soong lexer +* Norman Richards -- JSON lexer +* Corey Richardson -- Rust lexer updates +* Fabrizio Riguzzi -- cplint leder +* Lubomir Rintel -- GoodData MAQL and CL lexers +* Andre Roberge -- Tango style +* Georg Rollinger -- HSAIL lexer +* Michiel Roos -- TypoScript lexer +* Konrad Rudolph -- LaTeX formatter enhancements +* Mario Ruggier -- Evoque lexers +* Miikka Salminen -- Lovelace style, Hexdump lexer, lexer enhancements +* Stou Sandalski -- NumPy, FORTRAN, tcsh and XSLT lexers +* Matteo Sasso -- Common Lisp lexer +* Joe Schafer -- Ada lexer +* Max Schillinger -- TiddlyWiki5 lexer +* Andrew Schmidt -- X++ lexer +* Ken Schutte -- Matlab lexers +* René Schwaiger -- Rainbow Dash style +* Sebastian Schweizer -- Whiley lexer +* Tassilo Schweyer -- Io, MOOCode lexers +* Pablo Seminario -- PromQL lexer +* Ted Shaw -- AutoIt lexer +* Joerg Sieker -- ABAP lexer +* Robert Simmons -- Standard ML lexer +* Kirill Simonov -- YAML lexer +* Corbin Simpson -- Monte lexer +* Ville Skyttä -- ASCII armored lexer +* Alexander Smishlajev -- Visual FoxPro lexer +* Steve Spigarelli -- XQuery lexer +* Jerome St-Louis -- eC lexer +* Camil Staps -- Clean and NuSMV lexers; Solarized style +* James Strachan -- Kotlin lexer +* Tom Stuart -- Treetop lexer +* Colin Sullivan -- SuperCollider lexer +* Ben Swift -- Extempore lexer +* tatt61880 -- Kuin lexer +* Edoardo Tenani -- Arduino lexer +* Tiberius Teng -- default style overhaul +* Jeremy Thurgood -- Erlang, Squid config lexers +* Brian Tiffin -- OpenCOBOL lexer +* Bob Tolbert -- Hy lexer +* Doug Torrance -- Macaulay2 lexer +* Matthias Trute -- Forth lexer +* Tuoa Spi T4 -- Bdd lexer +* Erick Tryzelaar -- Felix lexer +* Alexander Udalov -- Kotlin lexer improvements +* Thomas Van Doren -- Chapel lexer +* Dave Van Ee -- Uxntal lexer updates +* Daniele Varrazzo -- PostgreSQL lexers +* Abe Voelker -- OpenEdge ABL lexer +* Pepijn de Vos -- HTML formatter CTags support +* Matthias Vallentin -- Bro lexer +* Benoît Vinot -- AMPL lexer +* Linh Vu Hong -- RSL lexer +* Immanuel Washington -- Smithy lexer +* Nathan Weizenbaum -- Haml and Sass lexers +* Nathan Whetsell -- Csound lexers +* Dietmar Winkler -- Modelica lexer +* Nils Winter -- Smalltalk lexer +* Davy Wybiral -- Clojure lexer +* Whitney Young -- ObjectiveC lexer +* Diego Zamboni -- CFengine3 lexer +* Enrique Zamudio -- Ceylon lexer +* Alex Zimin -- Nemerle lexer +* Rob Zimmerman -- Kal lexer +* Vincent Zurczak -- Roboconf lexer +* Hubert Gruniaux -- C and C++ lexer improvements +* Thomas Symalla -- AMDGPU Lexer +* 15b3 -- Image Formatter improvements +* Fabian Neumann -- CDDL lexer +* Thomas Duboucher -- CDDL lexer +* Philipp Imhof -- Pango Markup formatter +* Thomas Voss -- Sed lexer +* Martin Fischer -- WCAG contrast testing +* Marc Auberer -- Spice lexer +* Amr Hesham -- Carbon lexer +* diskdance -- Wikitext lexer +* vanillajonathan -- PRQL lexer +* Nikolay Antipov -- OpenSCAD lexer +* Markus Meyer, Nextron Systems -- YARA lexer +* Hannes Römer -- Mojo lexer + +Many thanks for all contributions! diff --git a/assets/Pygments/LICENSE.txt b/assets/Pygments/LICENSE.txt new file mode 100644 index 0000000000..446a1a805c --- /dev/null +++ b/assets/Pygments/LICENSE.txt @@ -0,0 +1,25 @@ +Copyright (c) 2006-2022 by the respective authors (see AUTHORS file). +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* 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. + +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 +OWNER 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. diff --git a/lib/licenses.dart b/lib/licenses.dart index 05c4513e8d..a52c3f3240 100644 --- a/lib/licenses.dart +++ b/lib/licenses.dart @@ -15,6 +15,16 @@ Stream additionalLicenses() async* { yield LicenseEntryWithLineBreaks( ['Noto Color Emoji'], await rootBundle.loadString('assets/Noto_Color_Emoji/LICENSE')); + yield LicenseEntryWithLineBreaks( + ['Pygments'], + await () async { + final [licenseFileText, authorsFileText] = await Future.wait([ + rootBundle.loadString('assets/Pygments/LICENSE.txt'), + rootBundle.loadString('assets/Pygments/AUTHORS.txt'), + ]); + + return '$licenseFileText\n\nAUTHORS file follows:\n\n$authorsFileText'; + }()); yield LicenseEntryWithLineBreaks( ['Source Code Pro'], await rootBundle.loadString('assets/Source_Code_Pro/LICENSE.md')); diff --git a/lib/widgets/code_block.dart b/lib/widgets/code_block.dart index 2bb0e59bbe..da07ca2f87 100644 --- a/lib/widgets/code_block.dart +++ b/lib/widgets/code_block.dart @@ -7,7 +7,6 @@ import 'text.dart'; /// [TextStyle]s used to render code blocks. /// /// Use [forSpan] for syntax highlighting. -// TODO(#749) follow web for dark-theme colors class CodeBlockTextStyles { // TODO(#754) update these styles factory CodeBlockTextStyles.light(BuildContext context) { @@ -245,6 +244,260 @@ class CodeBlockTextStyles { ); } + // Pygments Monokai, following web in web/styles/pygments.css. + // The CSS in comments is quoted from that file. + // The styles ultimately come from here: + // https://github.com/pygments/pygments/blob/f64833d9d/pygments/styles/monokai.py + factory CodeBlockTextStyles.dark(BuildContext context) { + final bold = weightVariableTextStyle(context, wght: 700); + return CodeBlockTextStyles._( + plain: kMonospaceTextStyle + .merge(TextStyle( + // --color-markdown-code-text in web + color: const HSLColor.fromAHSL(0.85, 0, 0, 1).toColor(), + fontSize: 0.825 * kBaseFontSize, + height: 1.4)) + .merge(weightVariableTextStyle(context)), + + // .hll { background-color: #49483e; } + hll: const TextStyle(backgroundColor: Color(0xff49483e)), + + // .c { color: #959077; } + c: const TextStyle(color: Color(0xff959077)), + + // .err { color: #ed007e; background-color: #1e0010; } + err: const TextStyle(color: Color(0xffed007e), backgroundColor: Color(0xff1e0010)), + + // .esc { color: #f8f8f2; } + esc: const TextStyle(color: Color(0xfff8f8f2)), + + // .g { color: #f8f8f2; } + g: const TextStyle(color: Color(0xfff8f8f2)), + + // .k { color: #66d9ef; } + k: const TextStyle(color: Color(0xff66d9ef)), + + // .l { color: #ae81ff; } + l: const TextStyle(color: Color(0xffae81ff)), + + // .n { color: #f8f8f2; } + n: const TextStyle(color: Color(0xfff8f8f2)), + + // .o { color: #ff4689; } + o: const TextStyle(color: Color(0xffff4689)), + + // .x { color: #f8f8f2; } + x: const TextStyle(color: Color(0xfff8f8f2)), + + // .p { color: #f8f8f2; } + p: const TextStyle(color: Color(0xfff8f8f2)), + + // .ch { color: #959077; } + ch: const TextStyle(color: Color(0xff959077)), + + // .cm { color: #959077; } + cm: const TextStyle(color: Color(0xff959077)), + + // .cp { color: #959077; } + cp: const TextStyle(color: Color(0xff959077)), + + // .cpf { color: #959077; } + cpf: const TextStyle(color: Color(0xff959077)), + + // .c1 { color: #959077; } + c1: const TextStyle(color: Color(0xff959077)), + + // .cs { color: #959077; } + cs: const TextStyle(color: Color(0xff959077)), + + // .gd { color: #ff4689; } + gd: const TextStyle(color: Color(0xffff4689)), + + // .ge { color: #f8f8f2; font-style: italic; } + ge: const TextStyle(color: Color(0xfff8f8f2), fontStyle: FontStyle.italic), + + // .ges { color: #f8f8f2; font-weight: bold; font-style: italic; } + ges: const TextStyle(color: Color(0xfff8f8f2), fontStyle: FontStyle.italic).merge(bold), + + // .gr { color: #f8f8f2; } + gr: const TextStyle(color: Color(0xfff8f8f2)), + + // .gh { color: #f8f8f2; } + gh: const TextStyle(color: Color(0xfff8f8f2)), + + // .gi { color: #a6e22e; } + gi: const TextStyle(color: Color(0xffa6e22e)), + + // .go { color: #66d9ef; } + go: const TextStyle(color: Color(0xff66d9ef)), + + // .gp { color: #ff4689; font-weight: bold; } + gp: const TextStyle(color: Color(0xffff4689)).merge(bold), + + // .gs { color: #f8f8f2; font-weight: bold; } + gs: const TextStyle(color: Color(0xfff8f8f2)).merge(bold), + + // .gu { color: #959077; } + gu: const TextStyle(color: Color(0xff959077)), + + // .gt { color: #f8f8f2; } + gt: const TextStyle(color: Color(0xfff8f8f2)), + + // .kc { color: #66d9ef; } + kc: const TextStyle(color: Color(0xff66d9ef)), + + // .kd { color: #66d9ef; } + kd: const TextStyle(color: Color(0xff66d9ef)), + + // .kn { color: #ff4689; } + kn: const TextStyle(color: Color(0xffff4689)), + + // .kp { color: #66d9ef; } + kp: const TextStyle(color: Color(0xff66d9ef)), + + // .kr { color: #66d9ef; } + kr: const TextStyle(color: Color(0xff66d9ef)), + + // .kt { color: #66d9ef; } + kt: const TextStyle(color: Color(0xff66d9ef)), + + // .ld { color: #e6db74; } + ld: const TextStyle(color: Color(0xffe6db74)), + + // .m { color: #ae81ff; } + m: const TextStyle(color: Color(0xffae81ff)), + + // .s { color: #e6db74; } + s: const TextStyle(color: Color(0xffe6db74)), + + // .na { color: #a6e22e; } + na: const TextStyle(color: Color(0xffa6e22e)), + + // .nb { color: #f8f8f2; } + nb: const TextStyle(color: Color(0xfff8f8f2)), + + // .nc { color: #a6e22e; } + nc: const TextStyle(color: Color(0xffa6e22e)), + + // .no { color: #66d9ef; } + no: const TextStyle(color: Color(0xff66d9ef)), + + // .nd { color: #a6e22e; } + nd: const TextStyle(color: Color(0xffa6e22e)), + + // .ni { color: #f8f8f2; } + ni: const TextStyle(color: Color(0xfff8f8f2)), + + // .ne { color: #a6e22e; } + ne: const TextStyle(color: Color(0xffa6e22e)), + + // .nf { color: #a6e22e; } + nf: const TextStyle(color: Color(0xffa6e22e)), + + // .nl { color: #f8f8f2; } + nl: const TextStyle(color: Color(0xfff8f8f2)), + + // .nn { color: #f8f8f2; } + nn: const TextStyle(color: Color(0xfff8f8f2)), + + // .nx { color: #a6e22e; } + nx: const TextStyle(color: Color(0xffa6e22e)), + + // .py { color: #f8f8f2; } + py: const TextStyle(color: Color(0xfff8f8f2)), + + // .nt { color: #ff4689; } + nt: const TextStyle(color: Color(0xffff4689)), + + // .nv { color: #f8f8f2; } + nv: const TextStyle(color: Color(0xfff8f8f2)), + + // .ow { color: #ff4689; } + ow: const TextStyle(color: Color(0xffff4689)), + + // .pm { color: #f8f8f2; } + pm: const TextStyle(color: Color(0xfff8f8f2)), + + // .w { color: #f8f8f2; } + w: const TextStyle(color: Color(0xfff8f8f2)), + + // .mb { color: #ae81ff; } + mb: const TextStyle(color: Color(0xffae81ff)), + + // .mf { color: #ae81ff; } + mf: const TextStyle(color: Color(0xffae81ff)), + + // .mh { color: #ae81ff; } + mh: const TextStyle(color: Color(0xffae81ff)), + + // .mi { color: #ae81ff; } + mi: const TextStyle(color: Color(0xffae81ff)), + + // .mo { color: #ae81ff; } + mo: const TextStyle(color: Color(0xffae81ff)), + + // .sa { color: #e6db74; } + sa: const TextStyle(color: Color(0xffe6db74)), + + // .sb { color: #e6db74; } + sb: const TextStyle(color: Color(0xffe6db74)), + + // .sc { color: #e6db74; } + sc: const TextStyle(color: Color(0xffe6db74)), + + // .dl { color: #e6db74; } + dl: const TextStyle(color: Color(0xffe6db74)), + + // .sd { color: #e6db74; } + sd: const TextStyle(color: Color(0xffe6db74)), + + // .s2 { color: #e6db74; } + s2: const TextStyle(color: Color(0xffe6db74)), + + // .se { color: #ae81ff; } + se: const TextStyle(color: Color(0xffae81ff)), + + // .sh { color: #e6db74; } + sh: const TextStyle(color: Color(0xffe6db74)), + + // .si { color: #e6db74; } + si: const TextStyle(color: Color(0xffe6db74)), + + // .sx { color: #e6db74; } + sx: const TextStyle(color: Color(0xffe6db74)), + + // .sr { color: #e6db74; } + sr: const TextStyle(color: Color(0xffe6db74)), + + // .s1 { color: #e6db74; } + s1: const TextStyle(color: Color(0xffe6db74)), + + // .ss { color: #e6db74; } + ss: const TextStyle(color: Color(0xffe6db74)), + + // .bp { color: #f8f8f2; } + bp: const TextStyle(color: Color(0xfff8f8f2)), + + // .fm { color: #a6e22e; } + fm: const TextStyle(color: Color(0xffa6e22e)), + + // .vc { color: #f8f8f2; } + vc: const TextStyle(color: Color(0xfff8f8f2)), + + // .vg { color: #f8f8f2; } + vg: const TextStyle(color: Color(0xfff8f8f2)), + + // .vi { color: #f8f8f2; } + vi: const TextStyle(color: Color(0xfff8f8f2)), + + // .vm { color: #f8f8f2; } + vm: const TextStyle(color: Color(0xfff8f8f2)), + + // .il { color: #ae81ff; } + il: const TextStyle(color: Color(0xffae81ff)), + ); + } + CodeBlockTextStyles._({ required this.plain, required TextStyle hll, diff --git a/pubspec.yaml b/pubspec.yaml index ca0abea5d2..fbadd4ba3e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -95,6 +95,8 @@ flutter: assets: - assets/Noto_Color_Emoji/LICENSE + - assets/Pygments/AUTHORS.txt + - assets/Pygments/LICENSE.txt - assets/Source_Code_Pro/LICENSE.md - assets/Source_Sans_3/LICENSE.md