Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify documentation #178

Merged
merged 2 commits into from
Mar 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ GFM is supported by default, however as GFM is a moving target and all GFM exten
iex(13)> Earmark.as_html! ["~~hello~~"]
"<p><del>hello</del></p>\n"

* Syntax Highlightening
* Syntax Highlighting

The generated code blocks have a corresponding `class` attribute:

Expand All @@ -93,7 +93,7 @@ which can be customized with the `code_class_prefix` option

* Tables

Are supported as long as they are preceeded by an empty line.
Are supported as long as they are preceded by an empty line.

State | Abbrev | Capital
----: | :----: | -------
Expand Down Expand Up @@ -141,7 +141,7 @@ For example:

#### To links or images

It is possible to add IAL attributes to genertated links or images in the following
It is possible to add IAL attributes to generated links or images in the following
format.

iex> markdown = "[link](url) {: .classy}"
Expand Down Expand Up @@ -232,21 +232,21 @@ containing an IAL-like string, as in the following example

## Integration

### Syntax Highlightning
### Syntax Highlighting

All backquoted or fenced code blocks with a language string are rendered with the given
language as a _class_ attribute of the _code_ tag.

For example:

...> "```elixir",
iex> ["```elixir",
...> " @tag :hello",
...> "```" ] |> Enum.join("\n")
...> Earmark.as_html!(code)
"<pre><code class=\"elixir\"> @tag :hello</code></pre>\n"
...> "```" ] |> Enum.join("\n") |> Earmark.as_html!()

will be rendered as

"<pre><code class=\"elixir\"> @tag :hello</code></pre>\n"


If you want to integrate with a syntax highlighter with different conventions you can add more classes by specifying prefixes that will be
put before the language string.
Expand Down