From 2bfb6c25d2d00f51385f77d34a15bbba8289fe37 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Thu, 2 Nov 2023 17:43:42 -0500 Subject: [PATCH 1/3] Fix tests trying to read differing cased files Before this change: ```sh $ node .config/do.mjs test Error: ENOENT: no such file or directory, open './docs/specs/readme.md' ``` Tested on Linux (Manjaro, arch-based) --- core/Tests.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Tests.fs b/core/Tests.fs index 8f2d680..032745f 100644 --- a/core/Tests.fs +++ b/core/Tests.fs @@ -271,7 +271,7 @@ type Results = {passes:int; failures:int; errors:int} [] let main argv = - let norm (s: String) = s.ToLower().Replace('\\', '/') + let norm (s: String) = s.Replace('\\', '/') let argv = Array.map norm argv let inArgv (f: string) = argv |> Array.exists (fun a -> f.EndsWith (a)) let filesToTest = From 435e4f6645e8833fef44b489d1ff0c72dac4ea33 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Thu, 2 Nov 2023 18:29:39 -0500 Subject: [PATCH 2/3] Add support for Zig comments Fix https://github.com/stkb/Rewrap/issues/388 --- core/Parsing.Documents.fs | 10 ++++++++-- docs/specs/content-types/zig.md | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 docs/specs/content-types/zig.md diff --git a/core/Parsing.Documents.fs b/core/Parsing.Documents.fs index d456176..fef3409 100644 --- a/core/Parsing.Documents.fs +++ b/core/Parsing.Documents.fs @@ -228,11 +228,17 @@ let mutable languages = [ lang "XML" "xsl" ".xml|.xsl" html lang "YAML" "" ".yaml|.yml" - /// Also allow text paragraphs to be wrapped. Though wrapping the whole - /// file at once will mess it up. + // Also allow text paragraphs to be wrapped. Though wrapping the whole + // file at once will mess it up. <| toNewDocProcessor (fun settings -> let comments = oldLine "#{1,3}" settings takeUntil comments (oldPlainText settings) |> repeatToEnd) + lang "Zig" "" ".zig|.zon" + ( oldSourceCode + [ customLine DocComments.javadoc "//[/!]" + cLine + ] + ) ] /// Creates a custom language parser, if the given CustomMarkers are valid. Also diff --git a/docs/specs/content-types/zig.md b/docs/specs/content-types/zig.md new file mode 100644 index 0000000..f382e3c --- /dev/null +++ b/docs/specs/content-types/zig.md @@ -0,0 +1,17 @@ +> language: "zig" + +Zig uses comment formats that might be familiar if you use Doxygen (C/C++) but there are +no multi-line block comments. + + // a b c -> // a b ¦ + // d ¦ // c d ¦ + +Doc comments: + + /// a b c -> /// a b ¦ + /// d ¦ /// c d ¦ + +Top-level doc comments: + + //! a b c -> //! a b ¦ + //! d ¦ //! c d ¦ From 71ba67b81b81095371f797a1f9a29a5885ce7d08 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Thu, 2 Nov 2023 22:48:25 -0500 Subject: [PATCH 3/3] Update `parcel` to fix packaging errors with Node.js 18 See https://github.com/parcel-bundler/parcel/issues/8005 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 641eaca..ed0ce73 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "@typescript-eslint/parser": "^5.12.0", "eslint": "^8.9.0", "log-update": "^5.0.0", - "parcel": "^2.3.2", + "parcel": "^2.10.2", "typescript": "^4.5.5", "vsce": "^2.6.7", "vscode-test": "^1.6.1"