diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d646303..3a5ea96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,4 +52,4 @@ jobs: - name: Upload Coverage Reports run: rebar3 coveralls send env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} diff --git a/README.md b/README.md index 331a088..2ef6509 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # e2h -`e2h` is an Erlang module designed to generate HTML content within the Erlang. It provides functions for encoding HTML elements and attributes, as well as escaping suspicious characters within HTML content. This module is suitable for developers who need to programmatically generate HTML documents or elements in their Erlang applications. +`e2h` (Erlang to HTML) is an Erlang module designed to generate HTML content within the Erlang. +It provides functions for encoding HTML elements and attributes, as well as escaping dangerous characters within HTML content. + +This module is suitable for developers who need to programmatically generate HTML documents or elements in their Erlang applications. [![Test Status](https://github.com/bunopnu/fresh/actions/workflows/test.yml/badge.svg)](https://github.com/bunopnu/fresh/actions/workflows/test.yml) [![Coverage Status](https://coveralls.io/repos/github/bunopnu/e2h/badge.svg?branch=main)](https://coveralls.io/github/bunopnu/e2h) @@ -10,18 +13,8 @@ Package can be installed by adding `e2h` to your list of dependencies: -### With Rebar3 - ```erlang -{deps, [{e2h, "0.4.0"}]}. -``` - -### With Mix - -```elixir -defp deps do - [{:e2h, "~> 0.4.0"}] -end +{deps, [{e2h, "0.4.1"}]}. ``` ## Usage Example @@ -35,11 +28,11 @@ UserName = <<"bob">>, UserJob = <<"data scientist">>, Document = [ - {'div', [{class, <<"user">>}, {status, UserStatus}], [ - {img, [{href, UserProfileImage}]}, - {'div', [], [ - {h1, [], [UserName]}, - {p, [], [UserJob]} + {<<"div">>, [{<<"class">>, <<"user">>}, {<<"status">>, UserStatus}], [ + {<<"img">>, [{<<"href">>, UserProfileImage}]}, + {<<"div">>, [], [ + {<<"h1">>, [], [UserName]}, + {<<"p">>, [], [UserJob]} ]} ]} ], diff --git a/rebar.config.script b/rebar.config.script index e5b5b05..c6f67d5 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -1,4 +1,4 @@ -case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of +case {os:getenv("GITHUB_ACTIONS"), os:getenv("COVERALLS_REPO_TOKEN")} of {"true", Token} when is_list(Token) -> CONFIG1 = [ {coveralls_repo_token, Token}, diff --git a/src/e2h.app.src b/src/e2h.app.src index fec6fd0..5db5c57 100644 --- a/src/e2h.app.src +++ b/src/e2h.app.src @@ -1,6 +1,6 @@ {application, e2h, [ {description, "HTML generator for Erlang ecosystem"}, - {vsn, "0.4.0"}, + {vsn, "0.4.1"}, {registered, []}, {applications, [ kernel,