Skip to content

Commit

Permalink
docs: user guide: windows & newlines
Browse files Browse the repository at this point in the history
Thanks @ikappaki for raising clj-commons#187

I'll leave the issue open for a bit to gather more feedback but at least
we've documented the behaviour for now.
  • Loading branch information
lread committed Sep 18, 2022
1 parent b449443 commit 563a6cd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:notitle:
// num-contributors is updated automatically by doc-readme-update bb task
:num-contributors: 54
:num-contributors: 55
:figure-caption!:
:imagesdir: ./doc
:project-src-coords: clj-commons/rewrite-clj
Expand Down Expand Up @@ -133,6 +133,7 @@ image:fazzone.png[fazzone,role="left",width=250,link="https://github.com/fazzone
image:ferdinand-beyer.png[ferdinand-beyer,role="left",width=250,link="https://github.com/ferdinand-beyer"]
image:green-coder.png[green-coder,role="left",width=250,link="https://github.com/green-coder"]
image:guoyongxin.png[guoyongxin,role="left",width=250,link="https://github.com/guoyongxin"]
image:ikappaki.png[ikappaki,role="left",width=250,link="https://github.com/ikappaki"]
image:immoh.png[immoh,role="left",width=250,link="https://github.com/immoh"]
image:ivarref.png[ivarref,role="left",width=250,link="https://github.com/ivarref"]
image:luxbock.png[luxbock,role="left",width=250,link="https://github.com/luxbock"]
Expand Down
9 changes: 8 additions & 1 deletion doc/01-user-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,16 @@ This is convenient when navigating through the source, but when we want to logic

== Parsing Peculiarities

Rewrite-clj can, in some specific cases, parse technically invalid Clojure.
Rewrite-clj might suprise Windows users and can, in some specific cases, parse technically invalid Clojure.
Some folks have come to rely on this over the years, so these are behaviours we will preserve.

=== Newlines Always Normalize to `\n`
Window users might be suprised that `\r\n` newlines are converted to `\n` by rewrite-clj.

Rewrite-clj makes use of https://github.com/clojure/tools.reader[Clojure's tools.reader] to parse Clojure code.
The `tools.reader` normalizes all recognized newline variants to `\n`.
Rewrite-clj picks up this behaviour.

[[unbalanced-maps]]
=== Unbalanced Maps
An unbalanced map is one where there is a key with no value.
Expand Down
4 changes: 3 additions & 1 deletion doc/contributors.edn
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@
{:github-id "NoahTheDuke"
:contributions [:issue :encouragement]}
{:github-id "ferdinand-beyer"
:contributions [:code-rewrite-clj-v1]}]
:contributions [:code-rewrite-clj-v1]}
{:github-id "ikappaki"
:contributions [:issue]}]
:founders
[{:github-id "xsc"
:contributions [:original-author :doc :design :issue :review :support :code-rewrite-clj-v0]}
Expand Down
Binary file added doc/generated/contributors/ikappaki.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 563a6cd

Please sign in to comment.