Compare commits

..

No commits in common. "main" and "v0.1.3" have entirely different histories.
main ... v0.1.3

3 changed files with 25 additions and 27 deletions

View file

@ -1,6 +1,6 @@
(package (package
(name (textmate-bjolang)) (name (textmate-bjolang))
(version "0.2.0") (version "0.1.3")
(description "Syntax highlighting for Bjolang: VS Code's TextMate grammars and themes, through TextMateSharp, as (text xml) nodes.") (description "Syntax highlighting for Bjolang: VS Code's TextMate grammars and themes, through TextMateSharp, as (text xml) nodes.")
(license "MPL-2.0") (license "MPL-2.0")

View file

@ -156,33 +156,31 @@
;; --------------------------------------------------------------------------- ;; ---------------------------------------------------------------------------
;; VS Code's themes, the ones TextMateSharp carries: #:theme 'dark-plus. ;; VS Code's themes, the ones TextMateSharp carries: #:theme 'dark-plus.
(def/grammar TmTheme (type (: TmTheme (Union (: ThemeDarkPlus #:tag dark-plus)
(:or (: ThemeDarkPlus 'dark-plus) (: ThemeLightPlus #:tag light-plus)
(: ThemeLightPlus 'light-plus) (: ThemeDark #:tag dark)
(: ThemeDark 'dark) (: ThemeLight #:tag light)
(: ThemeLight 'light) (: ThemeMonokai #:tag monokai)
(: ThemeMonokai 'monokai) (: ThemeDimmedMonokai #:tag dimmed-monokai)
(: ThemeDimmedMonokai 'dimmed-monokai) (: ThemeOneDark #:tag one-dark)
(: ThemeOneDark 'one-dark) (: ThemeAtomOneDark #:tag atom-one-dark)
(: ThemeAtomOneDark 'atom-one-dark) (: ThemeAtomOneLight #:tag atom-one-light)
(: ThemeAtomOneLight 'atom-one-light) (: ThemeDracula #:tag dracula)
(: ThemeDracula 'dracula) (: ThemeSolarizedDark #:tag solarized-dark)
(: ThemeSolarizedDark 'solarized-dark) (: ThemeSolarizedLight #:tag solarized-light)
(: ThemeSolarizedLight 'solarized-light) (: ThemeQuietLight #:tag quiet-light)
(: ThemeQuietLight 'quiet-light) (: ThemeKimbieDark #:tag kimbie-dark)
(: ThemeKimbieDark 'kimbie-dark) (: ThemeTomorrowNightBlue #:tag tomorrow-night-blue)
(: ThemeTomorrowNightBlue 'tomorrow-night-blue) (: ThemeAbyss #:tag abyss)
(: ThemeAbyss 'abyss) (: ThemeRed #:tag red)
(: ThemeRed 'red) (: ThemeHighContrastDark #:tag high-contrast-dark)
(: ThemeHighContrastDark 'high-contrast-dark) (: ThemeHighContrastLight #:tag high-contrast-light)
(: ThemeHighContrastLight 'high-contrast-light) (: ThemeVisualStudioDark #:tag visual-studio-dark)
(: ThemeVisualStudioDark 'visual-studio-dark) (: ThemeVisualStudioLight #:tag visual-studio-light))))
(: ThemeVisualStudioLight 'visual-studio-light)))
;; How a node is coloured: #:style 'inline or #:style 'classes. ;; How a node is coloured: #:style 'inline or #:style 'classes.
(def/grammar TmStyleMode (type (: TmStyleMode (Union (: StyleInline #:tag inline)
(:or (: StyleInline 'inline) (: StyleClasses #:tag classes))))
(: StyleClasses 'classes)))
;; How a piece of text looks. None is the theme's own colour, which the pre ;; How a piece of text looks. None is the theme's own colour, which the pre
;; around the code already has. ;; around the code already has.

View file

@ -149,7 +149,7 @@
" (code (@ (class \"language-csharp\")) (span (@ (style \"color:#B5CEA8\")) \"1\")))")) " (code (@ (class \"language-csharp\")) (span (@ (style \"color:#B5CEA8\")) \"1\")))"))
(expect "several lines, a newline between them" (expect "several lines, a newline between them"
(->str (highlight->nodes cs "1\n2" #:style 'classes)) (->str (highlight->nodes cs "1\n2" #:style 'classes))
(str "((span (@ (class \"tm-constant tm-constant-numeric\")) \"1\") \"\\n\"" (str "'((span (@ (class \"tm-constant tm-constant-numeric\")) \"1\") \"\\n\""
" (span (@ (class \"tm-constant tm-constant-numeric\")) \"2\"))")) " (span (@ (class \"tm-constant tm-constant-numeric\")) \"2\"))"))
;; --- the stylesheet --------------------------------------------------------- ;; --- the stylesheet ---------------------------------------------------------