Skip to content

Commit 7e8c99c

Browse files
kianmengmichalmuskala
authored andcommitted
Misc doc changes (michalmuskala#126)
List of changes: - Fix typo - Add changelog to html doc - Fix indentation in changelog - Embed license file to html doc - Update license copyright year - Use common source url - Use latest available ex_doc version
1 parent 61fd794 commit 7e8c99c

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313
* Fix `html_safe` escaping in `Jason.encode`
1414

15-
The `<!--` sequence of characters would not be escaped in `Jason.encode`
16-
with`html_escape` mode, which could lead to DoS attacks when used for
17-
embedding of arbitrary, user controlled strings into HTML through JSON
18-
(e.g. inside of `<script>` tags).
15+
The `<!--` sequence of characters would not be escaped in `Jason.encode`
16+
with`html_escape` mode, which could lead to DoS attacks when used for
17+
embedding of arbitrary, user controlled strings into HTML through JSON
18+
(e.g. inside of `<script>` tags).
1919

20-
If you were not using the `html_safe` option, you are not affected.
20+
If you were not using the `html_safe` option, you are not affected.
2121

22-
Affected versions: < 1.2.1
23-
Patched versions: >= 1.2.1
22+
Affected versions: < 1.2.1
23+
Patched versions: >= 1.2.1
2424

2525
## 1.2.0 (17.03.2020)
2626

@@ -91,4 +91,4 @@ No changes
9191

9292
## 1.0.0-rc.1 (22.12.2017)
9393

94-
Initial release
94+
* Initial release

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2017 Michał Muskała
1+
Copyright (c) 2017-present Michał Muskała
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
@@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
1010
distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
13-
limitations under the License.
13+
limitations under the License.

lib/formatter.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule Jason.Formatter do
33
Pretty-printing and minimizing functions for JSON-encoded data.
44
55
Input is required to be in an 8-bit-wide encoding such as UTF-8 or Latin-1
6-
in `t:iodata/0` format. Input must ve valid JSON, invalid JSON may produce
6+
in `t:iodata/0` format. Input must have valid JSON, invalid JSON may produce
77
unexpected results or errors.
88
"""
99

mix.exs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
defmodule Jason.Mixfile do
22
use Mix.Project
33

4+
@source_url "https://github.com/michalmuskala/jason"
45
@version "1.2.2"
56

67
def project() do
@@ -29,7 +30,7 @@ defmodule Jason.Mixfile do
2930
[
3031
{:decimal, "~> 1.0 or ~> 2.0", optional: true},
3132
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
32-
{:ex_doc, "~> 0.18", only: :dev, runtime: false},
33+
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
3334
] ++ maybe_stream_data()
3435
end
3536

@@ -58,7 +59,7 @@ defmodule Jason.Mixfile do
5859
[
5960
maintainers: ["Michał Muskała"],
6061
licenses: ["Apache-2.0"],
61-
links: %{"GitHub" => "https://github.com/michalmuskala/jason"}
62+
links: %{"GitHub" => @source_url}
6263
]
6364
end
6465

@@ -68,10 +69,8 @@ defmodule Jason.Mixfile do
6869
name: "Jason",
6970
source_ref: "v#{@version}",
7071
canonical: "http://hexdocs.pm/jason",
71-
source_url: "https://github.com/michalmuskala/jason",
72-
extras: [
73-
"README.md"
74-
]
72+
source_url: @source_url,
73+
extras: ["README.md", "CHANGELOG.md", "LICENSE"]
7574
]
7675
end
7776
end

0 commit comments

Comments
 (0)