Skip to content

Commit

Permalink
Split out formatters into separate packages.
Browse files Browse the repository at this point in the history
Closes #152.

API changes:

- Skylighting.Core no longer exports Skylighting.Format.ANSI,
  Skylighting.Format.HTML, Skylighting.Format.LaTeX.  These are
  now provided by separate packages, skylighting-format-ansi,
  skylighting-format-blaze-html, skylighting-format-latex.

- Skylighting.Types no longer exports XTerm256ColorCode.
  This has been moved to skylighting-format-ansi.
  • Loading branch information
jgm committed Jul 30, 2022
1 parent 8086a91 commit 16359a2
Show file tree
Hide file tree
Showing 19 changed files with 644 additions and 415 deletions.
4 changes: 4 additions & 0 deletions skylighting-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ This package provides the core functionality of the Skylighting project,
a Haskell syntax highlighting library with support for KDE XML syntax
highlighting descriptions.

Formatters are no longer included in this package: see
`skylighting-format-ansi`, `skylighting-format-blaze-html`, and
`skylighting-format-latex`.

For details on how to use this package, see the Haddock documentation and
the [Skylighting README](https://github.com/jgm/skylighting/blob/master/skylighting/README.md).

Expand Down
9 changes: 2 additions & 7 deletions skylighting-core/skylighting-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ library
Skylighting.Styles
Skylighting.Loader
Skylighting.Tokenizer
Skylighting.Format.ANSI
Skylighting.Format.HTML
Skylighting.Format.LaTeX
other-modules: Regex.KDE
Regex.KDE.Regex
Regex.KDE.Compile
Expand All @@ -131,10 +128,8 @@ library
xml-conduit >= 1.9.1.0 && < 1.10,
safe,
base64-bytestring,
blaze-html >= 0.5,
containers >= 0.6.0.1,
ansi-terminal >= 0.7,
colour >= 2.0
colour >= 2.0,
containers >= 0.6.0.1
hs-source-dirs: src
ghc-prof-options: -fprof-auto-exported
default-language: Haskell2010
Expand Down
6 changes: 0 additions & 6 deletions skylighting-core/src/Skylighting/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,13 @@ module Skylighting.Core (
, module Skylighting.Regex
, module Skylighting.Styles
, module Skylighting.Loader
, module Skylighting.Format.ANSI
, module Skylighting.Format.HTML
, module Skylighting.Format.LaTeX
) where
import Control.Monad
import Data.List (tails)
import qualified Data.Map as Map
import Data.Maybe (listToMaybe)
import Data.Text (Text)
import qualified Data.Text as Text
import Skylighting.Format.ANSI
import Skylighting.Format.HTML
import Skylighting.Format.LaTeX
import Skylighting.Loader
import Skylighting.Parser
import Skylighting.Regex
Expand Down
80 changes: 0 additions & 80 deletions skylighting-core/src/Skylighting/Format/ANSI.hs

This file was deleted.

Loading

0 comments on commit 16359a2

Please sign in to comment.