From 56da3f43159570c2e19c9d1975f67547f6e53fb5 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Sat, 23 Mar 2024 22:37:46 +0100 Subject: [PATCH] Fixed links in docs --- docs/Bundles/Fatdown.md | 2 +- docs/Filters/URL_features/Blacklist_hosts.md | 2 +- docs/Getting_started/Runtime_configuration.md | 2 +- docs/Plugins/BBCodes/Custom_BBCode_syntax.md | 8 ++++---- docs/Plugins/BBCodes/Localize_strings.md | 2 +- docs/Plugins/Censor/Standalone.md | 2 +- docs/Plugins/Keywords/Synopsis.md | 2 +- docs/Templating/Introduction.md | 2 +- docs/Utils/ParsedDOM.md | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/Bundles/Fatdown.md b/docs/Bundles/Fatdown.md index d456dbfcd3..dffbe3bf15 100644 --- a/docs/Bundles/Fatdown.md +++ b/docs/Bundles/Fatdown.md @@ -1,6 +1,6 @@

Fatdown, a Markdown bundle that doesn't suck too bad

-**Fatdown** is a bundle based on the [Litedown](/Plugins/Litedown/Synopsis.md) plugin which supports most of Markdown's features, plus the MediaEmbed and FancyPants plugins for media embedding and enhanced typography. +**Fatdown** is a bundle based on the [Litedown](../Plugins/Litedown/Synopsis.md) plugin which supports most of Markdown's features, plus the MediaEmbed and FancyPants plugins for media embedding and enhanced typography. ### Demo diff --git a/docs/Filters/URL_features/Blacklist_hosts.md b/docs/Filters/URL_features/Blacklist_hosts.md index ad3ab9efc3..d9ac36792b 100644 --- a/docs/Filters/URL_features/Blacklist_hosts.md +++ b/docs/Filters/URL_features/Blacklist_hosts.md @@ -50,4 +50,4 @@ http://notexample.org http://www.example.org ``` -Note that disallowing hosts does not *remove* the host name from the text, it only prevents *linking* to it. The [Censor](/Plugins/Censor/Synopsis) plugin can be used to censor them in plain text as well. +Note that disallowing hosts does not *remove* the host name from the text, it only prevents *linking* to it. The [Censor](../../Plugins/Censor/Synopsis.md) plugin can be used to censor them in plain text as well. diff --git a/docs/Getting_started/Runtime_configuration.md b/docs/Getting_started/Runtime_configuration.md index a711b841ea..fbddb4d6de 100644 --- a/docs/Getting_started/Runtime_configuration.md +++ b/docs/Getting_started/Runtime_configuration.md @@ -80,7 +80,7 @@ echo $html; ### Plug your own parser -[You can register your own parser to be executed at runtime.](/Plugins/Your_own_plugin/Register_parser) +[You can register your own parser to be executed at runtime.](../Plugins/Your_own_plugin/Register_parser.md) ## Renderer diff --git a/docs/Plugins/BBCodes/Custom_BBCode_syntax.md b/docs/Plugins/BBCodes/Custom_BBCode_syntax.md index ebae77f9fc..d344195af1 100644 --- a/docs/Plugins/BBCodes/Custom_BBCode_syntax.md +++ b/docs/Plugins/BBCodes/Custom_BBCode_syntax.md @@ -10,9 +10,9 @@ First, we need to express the typical BBCode usage. It takes the form of a mock Here, we see that the BBCode is named B and it contains some text. The pair of brackets with text in between is called a *token*. Tokens are used as placeholders for actual data, e.g. {URL}, {NUMBER}, etc... They take the form of a name in uppercase, which is either: - * the name of an attribute filter optionally followed by a number, e.g. {NUMBER1} will use the [built-in filter](/Filters/Built-in_filters.md) `#number`. + * the name of an attribute filter optionally followed by a number, e.g. {NUMBER1} will use the [built-in filter](../../Filters/Built-in_filters.md) `#number`. * either `TEXT` or `ANYTHING` for an unfiltered value. - * the name of a [template parameter](/Templating/Template_parameters.md), e.g. {L_WROTE} or {USERNAME}. + * the name of a [template parameter](../../Templating/Template_parameters.md), e.g. {L_WROTE} or {USERNAME}. The closing tag is optional if the BBCode isn't supposed to have one, for example: @@ -162,7 +162,7 @@ BBCode options can be specified in the opening tag like an attribute, using thei [B $forceLookahead=true]{TEXT}[/B] [* $tagName=LI]{TEXT}[/*] -[Tag options](/Internals/Limits.md) `nestingLimit` and `tagLimit` can be set the same way. +[Tag options](../../Internals/Limits.md) `nestingLimit` and `tagLimit` can be set the same way. [QUOTE $nestingLimit=3]{TEXT}[/QUOTE] @@ -170,7 +170,7 @@ Most scalar properties from the [BBCode class](https://s9e.github.io/TextFormatt ### Tag rules -[Tag rules](/Rules/Tag_rules.md) can be specified in the opening tag like an attribute, using their name preceded with a `#`. Boolean values can be expressed as `true` and `false` (in lowercase.) Multiple values can be separated with a comma. For example: +[Tag rules](../../Rules/Tag_rules.md) can be specified in the opening tag like an attribute, using their name preceded with a `#`. Boolean values can be expressed as `true` and `false` (in lowercase.) Multiple values can be separated with a comma. For example: [B #autoReopen=true]{TEXT}[/B] [U #denyChild=B,I]{TEXT}[/U] diff --git a/docs/Plugins/BBCodes/Localize_strings.md b/docs/Plugins/BBCodes/Localize_strings.md index f7b858e387..ff9806a938 100644 --- a/docs/Plugins/BBCodes/Localize_strings.md +++ b/docs/Plugins/BBCodes/Localize_strings.md @@ -1,6 +1,6 @@

Localize strings in a BBCode template

-One way to localize a BBCode template is to use a [template parameter](/Templating/Template_parameters.md). When creating a custom BBCode, any token that is not associated with a filter is presumed to be a template parameter. In the following example, we create a rudimentary `[spoiler]` BBCode that uses a normal token `{TEXT}` for its text and the tokens `{L_SPOILER}`, `{L_TOGGLE}` for the localized strings. Any uppercase names would work here, as long as they don't correspond to the name of a [built-in filter](/Filters/Built-in_filters.md). Before rendering, we set the values of the localized strings. +One way to localize a BBCode template is to use a [template parameter](../../Templating/Template_parameters.md). When creating a custom BBCode, any token that is not associated with a filter is presumed to be a template parameter. In the following example, we create a rudimentary `[spoiler]` BBCode that uses a normal token `{TEXT}` for its text and the tokens `{L_SPOILER}`, `{L_TOGGLE}` for the localized strings. Any uppercase names would work here, as long as they don't correspond to the name of a [built-in filter](../../Filters/Built-in_filters.md). Before rendering, we set the values of the localized strings. ```php $configurator = new s9e\TextFormatter\Configurator; diff --git a/docs/Plugins/Censor/Standalone.md b/docs/Plugins/Censor/Standalone.md index 7a666929de..432ec43145 100644 --- a/docs/Plugins/Censor/Standalone.md +++ b/docs/Plugins/Censor/Standalone.md @@ -2,7 +2,7 @@ The Censor plugin's helper class can be used as a standalone word filter. The censor helper doesn't use the standard parser and renderer and it has minimal dependencies. In the following example, we create an instance of the helper class that we cache in a standard file for performance. -Note that the standard autoloader is still required. See [Installation](/Getting_started/Installation.md). +Note that the standard autoloader is still required. See [Installation](../../Getting_started/Installation.md). ```php $cacheFile = '/tmp/censor.txt'; diff --git a/docs/Plugins/Keywords/Synopsis.md b/docs/Plugins/Keywords/Synopsis.md index 3cb8512815..c99460eade 100644 --- a/docs/Plugins/Keywords/Synopsis.md +++ b/docs/Plugins/Keywords/Synopsis.md @@ -11,7 +11,7 @@ Keywords are case-sensitive by default. ### When *not* to use this plugin -In some cases, it might be preferable to use the [Preg](/Plugins/Preg/Synopsis.md) plugin. For instance, in a programming forum, instead of creating a list of every function name as keywords (in order to link them to a manual, for example) you may want to use the Preg plugin and simply capture any series of valid characters immediately followed by a parenthesis. +In some cases, it might be preferable to use the [Preg](../Preg/Synopsis.md) plugin. For instance, in a programming forum, instead of creating a list of every function name as keywords (in order to link them to a manual, for example) you may want to use the Preg plugin and simply capture any series of valid characters immediately followed by a parenthesis. ## Examples diff --git a/docs/Templating/Introduction.md b/docs/Templating/Introduction.md index a33337e873..7782de13a0 100644 --- a/docs/Templating/Introduction.md +++ b/docs/Templating/Introduction.md @@ -1 +1 @@ -s9e\TextFormatter uses [XSLT 1.0](https://www.w3.org/TR/1999/REC-xslt-19991116) as its templating language. A template can be made of any XSL that would be valid in an `xsl:template` element. If it doesn't contain any XSL-specific markup, a template can also be defined using plain HTML, which is transparently converted to XSL. Note that most plugins accept other syntaxes and transparently convert them to XSL. For instance, the BBCodes plugin accepts templates in [its own syntax](/Plugins/BBCodes/Custom_BBCode_syntax.md) while the [Preg plugin](/Plugins/Preg/Synopsis.md) allows PCRE-style replacements. +s9e\TextFormatter uses [XSLT 1.0](https://www.w3.org/TR/1999/REC-xslt-19991116) as its templating language. A template can be made of any XSL that would be valid in an `xsl:template` element. If it doesn't contain any XSL-specific markup, a template can also be defined using plain HTML, which is transparently converted to XSL. Note that most plugins accept other syntaxes and transparently convert them to XSL. For instance, the BBCodes plugin accepts templates in [its own syntax](../Plugins/BBCodes/Custom_BBCode_syntax.md) while the [Preg plugin](../Plugins/Preg/Synopsis.md) allows PCRE-style replacements. diff --git a/docs/Utils/ParsedDOM.md b/docs/Utils/ParsedDOM.md index 02b90ea7fe..8dfa555a02 100644 --- a/docs/Utils/ParsedDOM.md +++ b/docs/Utils/ParsedDOM.md @@ -1,6 +1,6 @@ ### Getting started -The ParsedDOM utility allows you to load the [parsed representation of a text](/Getting_started/How_it_works/) (XML that is usually stored in a database) into a DOM document and operate on it with regular DOM methods as well as a [specialized API](https://s9e.github.io/TextFormatter/api/s9e/TextFormatter/Utils/ParsedDOM.html). Unlike native string manipulation it provides better guarantees that the resulting XML will match what the parser would normally produce. It is best suited for maintenance tasks. For lightweight, real-time operations, it is recommended to use the limited but more efficient [Utils](https://s9e.github.io/TextFormatter/api/s9e/TextFormatter/Utils.html) class if possible. +The ParsedDOM utility allows you to load the [parsed representation of a text](../Getting_started/How_it_works.md) (XML that is usually stored in a database) into a DOM document and operate on it with regular DOM methods as well as a [specialized API](https://s9e.github.io/TextFormatter/api/s9e/TextFormatter/Utils/ParsedDOM.html). Unlike native string manipulation it provides better guarantees that the resulting XML will match what the parser would normally produce. It is best suited for maintenance tasks. For lightweight, real-time operations, it is recommended to use the limited but more efficient [Utils](https://s9e.github.io/TextFormatter/api/s9e/TextFormatter/Utils.html) class if possible. ```php // Start with the parsed representation of the text