You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add XML doc comments to Literate.ParseAndCheckScriptFile/ParseScriptString; fix Windows-only path fallback
- Add full <summary>/<param> XML doc comments to ParseAndCheckScriptFile and
ParseScriptString to be consistent with the other Literate.Parse* methods
which already have detailed documentation.
- Fix hardcoded "C:\script.fsx" fallback path (used when neither 'path' nor
'rootInputFolder' is supplied) in ParseScriptString and ParsePynbString.
The fallback is now simply "script.fsx" so it looks correct on Linux/macOS
in diagnostic messages.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* ci: trigger checks
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Don Syme <dsyme@users.noreply.github.com>
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,10 @@
10
10
*`fsdocs convert` now accepts the input file as a positional argument (e.g. `fsdocs convert notebook.ipynb -o notebook.html`). [#1019](https://github.com/fsprojects/FSharp.Formatting/pull/1019)
11
11
*`fsdocs convert` infers the output format from the output file extension when `--outputformat` is not specified (e.g. `-o out.md` implies `--outputformat markdown`). [#1019](https://github.com/fsprojects/FSharp.Formatting/pull/1019)
12
12
*`fsdocs convert` now accepts `-o` as a shorthand for `--output`. [#1019](https://github.com/fsprojects/FSharp.Formatting/pull/1019)
13
+
* Added full XML doc comments (`<summary>`, `<param>`) to `Literate.ParseAndCheckScriptFile` and `Literate.ParseScriptString` to match the documentation style of the other `Literate.Parse*` methods.
14
+
15
+
### Fixed
16
+
*`Literate.ParseScriptString` and `Literate.ParsePynbString` used a hardcoded Windows path (`C:\script.fsx`) as the fallback script filename when neither `path` nor `rootInputFolder` is supplied. The fallback is now a simple platform-neutral `script.fsx`.
13
17
* Add regression tests for cross-assembly tooltip resolution (issue [#1085](https://github.com/fsprojects/FSharp.Formatting/issues/1085)): verify that hover tooltips for types whose fields reference types from other assemblies show the correct type names (not `obj`) when `#r` paths resolve correctly.
Copy file name to clipboardExpand all lines: src/FSharp.Formatting.Literate/Literate.fs
+28-4Lines changed: 28 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,18 @@ type Literate private () =
98
98
99
99
doc.With(paragraphs = pars)
100
100
101
-
/// Parse F# Script file to LiterateDocument
101
+
/// <summary>
102
+
/// Parse an F# script file (<c>.fsx</c>) to a <seecref="T:FSharp.Formatting.Literate.LiterateDocument"/>,
103
+
/// type-checking it via the F# Compiler Service.
104
+
/// </summary>
105
+
/// <paramname="path">The path to the <c>.fsx</c> script file to parse.</param>
106
+
/// <paramname="fscOptions">Additional F# compiler options (e.g. extra <c>-r:</c> references).</param>
107
+
/// <paramname="definedSymbols">Conditional-compilation symbols to define.</param>
108
+
/// <paramname="references">A map of reference labels to URLs, used to resolve Markdown-style links.</param>
109
+
/// <paramname="fsiEvaluator">An optional FSI evaluator; when supplied, code snippets are executed and their output included.</param>
110
+
/// <paramname="parseOptions">Markdown parse options. Defaults to <seecref="F:FSharp.Formatting.Markdown.MarkdownParseOptions.AllowYamlFrontMatter"/>.</param>
111
+
/// <paramname="rootInputFolder">The root folder used to resolve relative paths within the script. Defaults to the directory containing <paramrefname="path"/>.</param>
112
+
/// <paramname="onError">A callback invoked with each error/warning message encountered during parsing or type-checking. Defaults to <c>ignore</c>.</param>
102
113
static memberParseAndCheckScriptFile
103
114
(
104
115
path:string,
@@ -120,7 +131,20 @@ type Literate private () =
120
131
|> Transformations.formatCodeSnippets path ctx
121
132
|> Transformations.evaluateCodeSnippets ctx
122
133
123
-
/// Parse string as F# Script to LiterateDocument
134
+
/// <summary>
135
+
/// Parse a string containing F# script source code (<c>.fsx</c> syntax) to a
/// <paramname="content">The F# script source code to parse.</param>
140
+
/// <paramname="path">An optional file path used in diagnostics and to resolve relative references. When not supplied, defaults to <c>script.fsx</c> in <paramrefname="rootInputFolder"/> (or just <c>script.fsx</c>).</param>
141
+
/// <paramname="fscOptions">Additional F# compiler options (e.g. extra <c>-r:</c> references).</param>
142
+
/// <paramname="definedSymbols">Conditional-compilation symbols to define.</param>
143
+
/// <paramname="references">A map of reference labels to URLs, used to resolve Markdown-style links.</param>
144
+
/// <paramname="fsiEvaluator">An optional FSI evaluator; when supplied, code snippets are executed and their output included.</param>
145
+
/// <paramname="parseOptions">Markdown parse options. Defaults to <seecref="F:FSharp.Formatting.Markdown.MarkdownParseOptions.AllowYamlFrontMatter"/>.</param>
146
+
/// <paramname="rootInputFolder">The root folder used to resolve relative paths within the script.</param>
147
+
/// <paramname="onError">A callback invoked with each error/warning message encountered during parsing or type-checking. Defaults to <c>ignore</c>.</param>
0 commit comments