Skip to content

Commit

Permalink
Merge pull request #383 from lex111/improve-docs
Browse files Browse the repository at this point in the history
Improve docs
  • Loading branch information
colinodell committed Oct 4, 2019
2 parents 6ed589d + 29060da commit 4839e9f
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/0.18/customization/inline-rendering.md
Expand Up @@ -23,7 +23,7 @@ If the method can only handle certain inline types, be sure to verify that you'v

### Return value

The method must return the final HTML represenation of the entire inline and any contents. This can be an `HtmlElement` object (preferred; castable to a string) or a string of raw HTML.
The method must return the final HTML representation of the entire inline and any contents. This can be an `HtmlElement` object (preferred; castable to a string) or a string of raw HTML.

You are responsible for handling any escaping that may be necessary.

Expand Down
2 changes: 1 addition & 1 deletion docs/0.18/installation.md
Expand Up @@ -17,6 +17,6 @@ Ensure that you’ve set up your project to [autoload Composer-installed package

## Versioning

[SemVer](http://semver.org/) will be followed closely. 0.x versions will introduce breaking changes, so be careful which version constraints you use. **It's highly recommended that you use [Composer's caret operator](https://getcomposer.org/doc/articles/versions.md#caret) to ensure compatiblity**; for example: `^0.18`. This is equivalent to `>=0.18.0 <0.19.0`.
[SemVer](http://semver.org/) will be followed closely. 0.x versions will introduce breaking changes, so be careful which version constraints you use. **It's highly recommended that you use [Composer's caret operator](https://getcomposer.org/doc/articles/versions.md#caret) to ensure compatibility**; for example: `^0.18`. This is equivalent to `>=0.18.0 <0.19.0`.

If you're only using the `CommonMarkConverter` class to convert Markdown (no other class references, custom parsers, etc.), then it should be safe to use a broader constraint like `~0.18`, `>0.18`, etc. I personally promise to never break this specific class in any future 0.x release.
2 changes: 1 addition & 1 deletion docs/0.18/upgrading.md
Expand Up @@ -5,4 +5,4 @@ title: Upgrading from 0.17 to 0.18

# Upgrading from 0.17 to 0.18

No breaking changes were introduced, but we did add a new interface: `ConverterInface`. Consider depending on this interface in your code instead of the concrete implementation. (See [#330](https://github.com/thephpleague/commonmark/issues/330))
No breaking changes were introduced, but we did add a new interface: `ConverterInterface`. Consider depending on this interface in your code instead of the concrete implementation. (See [#330](https://github.com/thephpleague/commonmark/issues/330))
2 changes: 1 addition & 1 deletion docs/0.19/customization/inline-rendering.md
Expand Up @@ -24,7 +24,7 @@ If the method can only handle certain inline types, be sure to verify that you'v

### Return value

The method must return the final HTML represenation of the entire inline and any contents. This can be an `HtmlElement` object (preferred; castable to a string) or a string of raw HTML.
The method must return the final HTML representation of the entire inline and any contents. This can be an `HtmlElement` object (preferred; castable to a string) or a string of raw HTML.

You are responsible for handling any escaping that may be necessary.

Expand Down
2 changes: 1 addition & 1 deletion docs/0.19/installation.md
Expand Up @@ -18,6 +18,6 @@ Ensure that you’ve set up your project to [autoload Composer-installed package

## Versioning

[SemVer](http://semver.org/) will be followed closely. 0.x versions will introduce breaking changes, so be careful which version constraints you use. **It's highly recommended that you use [Composer's caret operator](https://getcomposer.org/doc/articles/versions.md#caret) to ensure compatiblity**; for example: `^0.18`. This is equivalent to `>=0.18.0 <0.19.0`.
[SemVer](http://semver.org/) will be followed closely. 0.x versions will introduce breaking changes, so be careful which version constraints you use. **It's highly recommended that you use [Composer's caret operator](https://getcomposer.org/doc/articles/versions.md#caret) to ensure compatibility**; for example: `^0.18`. This is equivalent to `>=0.18.0 <0.19.0`.

If you're only using the `CommonMarkConverter` class to convert Markdown (no other class references, custom parsers, etc.), then it should be safe to use a broader constraint like `~0.19`, `>0.19`, etc. I personally promise to never break this specific class in any future 0.x release.
2 changes: 1 addition & 1 deletion docs/0.19/upgrading.md
Expand Up @@ -26,7 +26,7 @@ The `getName()` method has been removed from several classes:

This method was originally intended for supporting XML rendering, which was never implemented, and will likely define names a bit differently if/when we do add support.

After doing this, the two abstract classes mentioned above had notthing left in them, so those were removed. Any parsers previously extending them should directly implement the corresponding interface instead.
After doing this, the two abstract classes mentioned above had nothing left in them, so those were removed. Any parsers previously extending them should directly implement the corresponding interface instead.

`InlineContainer` was also removed.

Expand Down
2 changes: 1 addition & 1 deletion docs/1.0/configuration.md
Expand Up @@ -26,7 +26,7 @@ $converter = new CommonMarkConverter([
'use_underscore' => true,
'html_input' => 'escape',
'allow_unsafe_links' => false,
'max_nesting_level' => INF
'max_nesting_level' => INF,
]);
~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/1.0/customization/event-dispatcher.md
@@ -1,7 +1,7 @@
---
layout: default
title: Event Dispatcher
description: How to leverate the event dispatcher to hook into the library
description: How to leverage the event dispatcher to hook into the library
redirect_from:
- /0.20/customization/document-processing/
- /1.0/customization/document-processing/
Expand Down
2 changes: 1 addition & 1 deletion docs/1.0/customization/inline-parsing.md
Expand Up @@ -144,6 +144,6 @@ $environment->addInlineParser(new SmilieParserParser());

## Tips

* For best performance, `return false` **as soon as possible**
* For best performance, `return false` **as soon as possible**.
* You can `peek()` without modifying the cursor state. This makes it useful for validating nearby characters as it's quick and you can bail without needed to restore state.
* You can look at (and modify) any part of the AST if needed (via `$inlineContext->getContainer()`).
2 changes: 1 addition & 1 deletion docs/1.0/customization/inline-rendering.md
Expand Up @@ -25,7 +25,7 @@ If the method can only handle certain inline types, be sure to verify that you'v

### Return value

The method must return the final HTML represenation of the entire inline and any contents. This can be an `HtmlElement` object (preferred; castable to a string) or a string of raw HTML.
The method must return the final HTML representation of the entire inline and any contents. This can be an `HtmlElement` object (preferred; castable to a string) or a string of raw HTML.

You are responsible for handling any escaping that may be necessary.

Expand Down
2 changes: 1 addition & 1 deletion docs/1.0/installation.md
Expand Up @@ -19,4 +19,4 @@ Ensure that you’ve set up your project to [autoload Composer-installed package

## Versioning

[SemVer](http://semver.org/) will be followed closely. **It's highly recommended that you use [Composer's caret operator](https://getcomposer.org/doc/articles/versions.md#caret) to ensure compatiblity**; for example: `^1.0`. This is equivalent to `>=1.0 <2.0`.
[SemVer](http://semver.org/) will be followed closely. **It's highly recommended that you use [Composer's caret operator](https://getcomposer.org/doc/articles/versions.md#caret) to ensure compatibility**; for example: `^1.0`. This is equivalent to `>=1.0 <2.0`.
1 change: 1 addition & 0 deletions docs/1.0/security.md
Expand Up @@ -57,6 +57,7 @@ To prevent these from being parsed and rendered, you should set the `allow_unsaf
If you need to parse untrusted input, consider setting a reasonable `max_nesting_level` (perhaps 10-50) depending on your needs. Once this nesting level is hit, any subsequent Markdown will be rendered as plain text.

### Example - Prevent deep nesting

~~~php
use League\CommonMark\CommonMarkConverter;

Expand Down

0 comments on commit 4839e9f

Please sign in to comment.