Use token abbrevs in HTML

This commit is contained in:
Roberto Alsina 2024-08-06 20:16:52 -03:00
parent a9ff9bc8ac
commit 499cf7f623

View File

@ -1,5 +1,6 @@
require "./tartrazine.cr"
require "./constantes.cr"
require "./styles.cr"
require "./tartrazine.cr"
module Tartrazine
# This is the base class for all formatters.
@ -54,6 +55,7 @@ module Tartrazine
# Given a token type, return the CSS class to use.
def get_css_class(token, theme)
token = Abbreviations[token]
return token if theme.styles.has_key?(token)
# Themes don't contain information for each specific