hejsan hoppsan

This commit is contained in:
Linus Björnstam 2026-03-31 13:36:22 +02:00
parent 27a169b30c
commit f971423f04
9 changed files with 264 additions and 98 deletions

View file

@ -1,5 +1,8 @@
namespace Fibble.FibLib
open System
open System.Xml.Schema
module Pandoc =
open System.Diagnostics
@ -17,14 +20,16 @@ module Pandoc =
use proc = Process.Start startInfo
// Skriv markdown till Pandoc
use stdin = proc.StandardInput
stdin.Write markdownText
stdin.WriteLine markdownText
stdin.Close() // Måste stängas Pandoc vet att texten är slut
// Läs ut resultatet
let htmlOutput = proc.StandardOutput.ReadToEnd()
let errorOutput = proc.StandardError.ReadToEnd()
proc.WaitForExit()
Console.WriteLine(htmlOutput)
if proc.ExitCode = 0 then
htmlOutput.Trim()
else
@ -35,4 +40,5 @@ module Pandoc =
sprintf "\n<pre>%s</pre> and <pre>%s</pre>" ex.Message markdownText
let mdToHtml markdownText =
toHtml "markdown" markdownText
let res= toHtml "markdown" markdownText
res