Skip to content

Commit

Permalink
fix markdown test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Dec 18, 2023
1 parent 1fbc8bd commit 06c7f57
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ putTag ann x = case ann of
nameIdAttr :: (Members '[Reader HtmlOptions] r) => S.NameId -> Sem r AttributeValue
nameIdAttr nid = do
pfx <- unpack <$> asks (^. htmlOptionsIdPrefix)
return $ fromString $ pfx <> show nid
return $ fromString $ pfx <> show (pretty nid)

moduleDocRelativePath :: (Members '[Reader HtmlOptions] r) => TopModulePath -> Sem r (Path Rel File)
moduleDocRelativePath m = do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ go = do
else
MkTextBlock
TextBlock
{ _textBlock =
Text.replace "\n" "<br/>" $
resHtml,
{ _textBlock = Text.replace "\n" "<br/>" resHtml,
_textBlockInterval = j ^. juvixCodeBlockInterval
}
let newState =
Expand Down
15 changes: 2 additions & 13 deletions test/BackendMarkdown/Positive.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import Base
import Juvix.Compiler.Backend.Markdown.Translation.FromTyped.Source
import Juvix.Compiler.Concrete qualified as Concrete
import Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping qualified as Scoper
import Juvix.Compiler.Pipeline.Loader.PathResolver
import Juvix.Compiler.Pipeline.Setup

data PosTest = PosTest
{ _name :: String,
Expand Down Expand Up @@ -36,17 +34,8 @@ testDescr PosTest {..} =
_testRoot = _dir,
_testAssertion = Steps $ \step -> do
entryPoint <- testDefaultEntryPointIO _dir _file
step "Parsing"
PipelineResult p _ <- snd <$> testRunIO entryPoint upToParsing
step "Scoping"
PipelineResult s _ <-
snd
<$> testRunIO
entryPoint
( do
void (entrySetup defaultDependenciesConfig)
runReader p Concrete.fromParsed
)
step "Parsing & Scoping"
PipelineResult s _ <- snd <$> testRunIO entryPoint upToScoping
let m = s ^. Scoper.resultModule
let opts =
ProcessJuvixBlocksArgs
Expand Down
Loading

0 comments on commit 06c7f57

Please sign in to comment.