Skip to content

Commit 613e6d4

Browse files
authored
docs: user guide: windows & newlines (#188) [skip ci]
Thanks @ikappaki for raising #187 I'll leave the issue open for a bit to gather more feedback but at least we've documented the behaviour for now. I've included a link to a question I raised on Ask Clojure.
1 parent b449443 commit 613e6d4

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

README.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:notitle:
22
// num-contributors is updated automatically by doc-readme-update bb task
3-
:num-contributors: 54
3+
:num-contributors: 55
44
:figure-caption!:
55
:imagesdir: ./doc
66
:project-src-coords: clj-commons/rewrite-clj
@@ -133,6 +133,7 @@ image:fazzone.png[fazzone,role="left",width=250,link="https://github.com/fazzone
133133
image:ferdinand-beyer.png[ferdinand-beyer,role="left",width=250,link="https://github.com/ferdinand-beyer"]
134134
image:green-coder.png[green-coder,role="left",width=250,link="https://github.com/green-coder"]
135135
image:guoyongxin.png[guoyongxin,role="left",width=250,link="https://github.com/guoyongxin"]
136+
image:ikappaki.png[ikappaki,role="left",width=250,link="https://github.com/ikappaki"]
136137
image:immoh.png[immoh,role="left",width=250,link="https://github.com/immoh"]
137138
image:ivarref.png[ivarref,role="left",width=250,link="https://github.com/ivarref"]
138139
image:luxbock.png[luxbock,role="left",width=250,link="https://github.com/luxbock"]

doc/01-user-guide.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,9 +702,18 @@ This is convenient when navigating through the source, but when we want to logic
702702

703703
== Parsing Peculiarities
704704

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

708+
=== Newlines Always Normalize to `\n`
709+
Window users might be suprised that `\r\n` newlines are converted to `\n` by rewrite-clj.
710+
711+
Rewrite-clj makes use of https://github.com/clojure/tools.reader[Clojure's tools.reader] to parse Clojure code.
712+
The `tools.reader` normalizes all recognized newline variants to `\n`.
713+
Rewrite-clj picks up this behaviour.
714+
715+
You can chime in and/or up-vote on this topic on https://ask.clojure.org/index.php/12216/clojure-tools-reader-intent-regarding-newline-normalization[Ask Clojure].
716+
708717
[[unbalanced-maps]]
709718
=== Unbalanced Maps
710719
An unbalanced map is one where there is a key with no value.

doc/contributors.edn

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@
9999
{:github-id "NoahTheDuke"
100100
:contributions [:issue :encouragement]}
101101
{:github-id "ferdinand-beyer"
102-
:contributions [:code-rewrite-clj-v1]}]
102+
:contributions [:code-rewrite-clj-v1]}
103+
{:github-id "ikappaki"
104+
:contributions [:issue]}]
103105
:founders
104106
[{:github-id "xsc"
105107
:contributions [:original-author :doc :design :issue :review :support :code-rewrite-clj-v0]}
6.16 KB
Loading

0 commit comments

Comments
 (0)