Expectations come from the djot syntax reference and IR.hs rather than from what the parser currently produces, so a failure is evidence of a bug instead of a record of one. 55 properties: 32 inline (emphasis, verbatim, math, raw, links, images, references, autolinks, spans, attributes, footnotes, symbols, escapes, smart punctuation) and 23 block (headings, quotes, breaks, code fences, divs, raw blocks, every ordered marker style and delimiter, tight vs loose items, nesting, task lists, definition lists, tables, definitions, block attributes, round trip). Two rules are deliberately unasserted and noted in the module header: headings of seven or more hashes, and the general verbatim space stripping rule, of which only the unambiguous backtick case is tested. Three deviations the suite found, fixed in Djot.hs: - an unclosed verbatim span failed the construct back into plain text. The reference says it "extends to the end of the text"; manyTill cannot say that on its own, it needs the eof alternative. - a task list checkbox was recognised without the space the reference requires after it, so "1. [x](5)" ate a link and turned it into a checked item containing a list starting at 5. - checkboxes were recognised on ordered items, but the reference gives them to bullet items only. Test.Gen.Document is now shared by both suites. Syntax grew quoteContent and listTypeFor for the two places markdown and djot disagree about the resulting IR, and two djot facts became generator invariants rather than assertions: adjacent markup sharing a delimiter is ambiguous, so runs separate it, and a blank line between two lists makes one loose list rather than two blocks, so documents never place lists back to back. The test suite is no longer markdown only, so it is just "tests" now. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
60 lines
2.4 KiB
Text
60 lines
2.4 KiB
Text
cabal-version: 3.4
|
|
name: psb
|
|
|
|
-- The package version.
|
|
-- See the Haskell package versioning policy (PVP) for standards
|
|
-- guiding when and how versions should be incremented.
|
|
-- https://pvp.haskell.org
|
|
-- PVP summary: +-+------- breaking API changes
|
|
-- | | +----- non-breaking API additions
|
|
-- | | | +--- code changes with no API change
|
|
version: 0.2.0.0
|
|
|
|
license: MIT
|
|
license-file: LICENSE
|
|
|
|
author: Pagwin
|
|
maintainer: dev@pagwin.xyz
|
|
|
|
category: Web
|
|
build-type: Simple
|
|
extra-doc-files: CHANGELOG.md
|
|
description: A Static site generator I've built for my purposes
|
|
|
|
|
|
common warnings
|
|
ghc-options: -Wall
|
|
|
|
library
|
|
hs-source-dirs: src
|
|
exposed-modules: Djot Markdown HTML Logger IR Logger.Shake Psb.Main Utilities Utilities.FilePath Utilities.Action Utilities.Javascript Utilities.CSS Templates Types Config Utilities.Bundling
|
|
other-modules: Utilities.Parsing
|
|
build-depends: base, mustache >=2.4.2, shake >= 0.19.8, deriving-aeson >= 0.2.9, aeson, text >= 2.1.2, time, unordered-containers, yaml, megaparsec >= 9.7.0, transformers >= 0.6.2, bytestring
|
|
default-extensions: ApplicativeDo DataKinds NamedFieldPuns DerivingVia LambdaCase TypeApplications DeriveGeneric OverloadedRecordDot NamedFieldPuns DuplicateRecordFields DisambiguateRecordFields FlexibleInstances
|
|
|
|
test-suite tests
|
|
hs-source-dirs: tests
|
|
type: exitcode-stdio-1.0
|
|
main-is: Main.hs
|
|
other-modules: Test.Gen, Test.Gen.Document, Test.Harness, Markdown.Parse, Djot.Parse
|
|
build-depends: base, text, megaparsec, transformers, QuickCheck, tasty, tasty-quickcheck, time, psb
|
|
|
|
default-extensions: ApplicativeDo DataKinds NamedFieldPuns DerivingVia LambdaCase TypeApplications DeriveGeneric OverloadedRecordDot NamedFieldPuns DuplicateRecordFields DisambiguateRecordFields FlexibleInstances
|
|
default-language: Haskell2010
|
|
|
|
|
|
executable psb
|
|
import: warnings
|
|
hs-source-dirs: app
|
|
-- .hs or .lhs file containing the Main module.
|
|
main-is: Main.hs
|
|
ghc-options: -threaded
|
|
build-depends: psb, base
|
|
|
|
|
|
-- default-extensions: ApplicativeDo DataKinds NamedFieldPuns DerivingVia LambdaCase TypeApplications DeriveGeneric OverloadedRecordDot NamedFieldPuns DuplicateRecordFields DisambiguateRecordFields FlexibleInstances
|
|
|
|
source-repository head
|
|
type: git
|
|
location: https://git.pagwin.xyz/Pagwin/psb
|
|
|