mirror of
https://github.com/Smaug123/WoofWare.Whippet
synced 2025-10-12 11:18:40 +00:00
Initial import of Fantomas client library (#6)
Some checks failed
.NET / build (Debug) (push) Has been cancelled
.NET / build (Release) (push) Has been cancelled
.NET / analyzers (push) Has been cancelled
.NET / build-nix (push) Has been cancelled
.NET / check-dotnet-format (push) Has been cancelled
.NET / check-nix-format (push) Has been cancelled
.NET / Check links (push) Has been cancelled
.NET / Check flake (push) Has been cancelled
.NET / nuget-pack (push) Has been cancelled
.NET / expected-pack (push) Has been cancelled
.NET / all-required-checks-complete (push) Has been cancelled
Some checks failed
.NET / build (Debug) (push) Has been cancelled
.NET / build (Release) (push) Has been cancelled
.NET / analyzers (push) Has been cancelled
.NET / build-nix (push) Has been cancelled
.NET / check-dotnet-format (push) Has been cancelled
.NET / check-nix-format (push) Has been cancelled
.NET / Check links (push) Has been cancelled
.NET / Check flake (push) Has been cancelled
.NET / nuget-pack (push) Has been cancelled
.NET / expected-pack (push) Has been cancelled
.NET / all-required-checks-complete (push) Has been cancelled
This commit is contained in:
20
WoofWare.Whippet.Fantomas/PreXmlDoc.fs
Normal file
20
WoofWare.Whippet.Fantomas/PreXmlDoc.fs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace WoofWare.Whippet.Fantomas
|
||||
|
||||
open Fantomas.FCS.Xml
|
||||
open Fantomas.FCS.Text.Range
|
||||
|
||||
/// Module for manipulating the PreXmlDoc AST type (which represents XML docstrings).
|
||||
[<RequireQualifiedAccess>]
|
||||
module PreXmlDoc =
|
||||
/// Pass an arbitrary string in here, with newlines if you like, and we'll make sure it appears correctly.
|
||||
let create (s : string) : PreXmlDoc =
|
||||
let s = s.Split "\n"
|
||||
|
||||
for i = 0 to s.Length - 1 do
|
||||
s.[i] <- " " + s.[i]
|
||||
|
||||
PreXmlDoc.Create (s, range0)
|
||||
|
||||
/// This is a light wrapper around Fantomas's `PreXmlDoc`; you should probably use `create` instead.
|
||||
let create' (s : string seq) : PreXmlDoc =
|
||||
PreXmlDoc.Create (Array.ofSeq s, range0)
|
Reference in New Issue
Block a user