Skip to content

Commit

Permalink
[TASK] Replace all literalblocks with code-blocks
Browse files Browse the repository at this point in the history
Remove unneded highlights
  • Loading branch information
linawolf committed May 10, 2024
1 parent 555759a commit 549acd2
Show file tree
Hide file tree
Showing 59 changed files with 104 additions and 97 deletions.
1 change: 0 additions & 1 deletion Documentation/About.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. _about:

================
Expand Down
1 change: 0 additions & 1 deletion Documentation/BasicPrinciples.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. _basic-principles:

================
Expand Down
17 changes: 11 additions & 6 deletions Documentation/GeneralConventions/CodingGuidelines.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: pair: Coding guidelines; reST
.. _format-rest-cgl:

Expand Down Expand Up @@ -156,9 +155,9 @@ Use the conventions as defined in :ref:`Headlines-and-sections`.

This underlining is used **per (.rst) file**. It does not matter where in the toctree
the file is. You always start with underlining for level 1 (title) in each
file::

file:

.. code-block:: rst
========
1. Title
Expand Down Expand Up @@ -200,19 +199,25 @@ file::
How to add version hints
========================

Example, how you can point out **deprecations**::
Example, how you can point out **deprecations**:

.. code-block:: rst
.. deprecated:: 10.2
The hook shown here is deprecated since TYPO3 10.2 - use a custom
:ref:`PSR-15 middleware<request-handling>` instead.
New **feature**::
New **feature**:

.. code-block:: rst
.. versionadded:: 10.2
Starting with TYPO3 10.2 hooks and signals have been replaced by a PSR-14 based
event dispatching system.
Changes::
Changes:

.. code-block:: rst
.. versionchanged:: 2.3.1
This feature was changed ...
Expand Down
4 changes: 3 additions & 1 deletion Documentation/GeneralConventions/ContentStyleGuide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ Examples:
This applies to **all headers** on a page, not just the top level header (title).

In reST, headers are created by underlining / overlining with (`====`, `----`, etc.)
as described in :ref:`Headlines-and-sections`::
as described in :ref:`Headlines-and-sections`:

.. code-block:: rst
=================
This is the title
Expand Down
4 changes: 2 additions & 2 deletions Documentation/GeneralConventions/Format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ If you’re encountering problems with the rendering of your markdown files, con
reST vs. Markdown
=================

Victor Zverovich makes the comparison::
Victor Zverovich makes the comparison:

According to John Gruber, the inventor of Markdown, “Markdown’s syntax is intended for one
purpose: to be used as a format for writing for the web.” and, in particular, it supports inline HTML.
reStructuredText on the other hand is specifically designed for writing technical documentation.


readthedocs::
readthedocs:

"It should be noted that Commonmark doesn’t support a lot of the concepts that RST lets you represent.
In particular, there is no standardized way in Commonmark to represent inline or block levels constructs.
Expand Down
1 change: 0 additions & 1 deletion Documentation/GeneralConventions/Glossary.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index::
Spelling; Reference
Preferred terms
Expand Down
1 change: 0 additions & 1 deletion Documentation/GeneralConventions/GuidelinesForImages.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index::
! Images
Screenshots
Expand Down
13 changes: 9 additions & 4 deletions Documentation/GeneralConventions/Index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: Documentation; Content style guide
.. _general-conventions:
.. _conventions:
Expand Down Expand Up @@ -41,7 +40,9 @@ be found in the subchapters.
#. Version hints

:ref:`version-hints` describes how to add version hints for new sections
or chapters::
or chapters:

.. code-block:: rst
.. deprecated:: 10.2
The hook shown here is deprecated since TYPO3 10.2 - use a custom
Expand All @@ -65,7 +66,9 @@ be found in the subchapters.
#. Coding guidelines for headers

Headline underline should follow :ref:`rest-cgl-headline-underlines`::
Headline underline should follow :ref:`rest-cgl-headline-underlines`

.. code-block:: rst
=====
Title
Expand All @@ -86,7 +89,9 @@ be found in the subchapters.

#. Refer to elements in the GUI with :rst:`:guilabel:`

Example::
Example:

.. code-block:: rst
:guilabel:`Admin Tools > Extensions`
Expand Down
1 change: 0 additions & 1 deletion Documentation/GeneralConventions/Licenses.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index::
Documentation; License
Documentation; Openpub license
Expand Down
1 change: 0 additions & 1 deletion Documentation/GeneralConventions/ReviewInformation.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: ! Reviewing manuals
.. _guidelines-for-reviewing:

Expand Down
1 change: 0 additions & 1 deletion Documentation/HowToAddTranslation/Index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: Documentation; Translation
.. _add-translation:

Expand Down
1 change: 0 additions & 1 deletion Documentation/Maintainers/BackportChanges.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: shell
.. index:: Changes; Backporting
.. _backport-changes:

Expand Down
1 change: 0 additions & 1 deletion Documentation/Maintainers/Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index::
Documentation; Update
Documentation; New releases
Expand Down
1 change: 0 additions & 1 deletion Documentation/Maintainers/Tools.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: shell
.. index:: Changes; Backporting
.. _tools_of_the_documentation_team:

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Migration/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ To be discussed: Index generation (glossary)
The Sphinx rendering allowed to utilize a syntax like the following to
add indexes to your documentation:

.. code-block::
.. code-block:: plaintext
:caption: Documentation/Index.rst
.. index::
Expand Down
1 change: 0 additions & 1 deletion Documentation/RenderingDocs/Index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. Index::
pair: Documentation; Rendering
Rendering; Locally
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: pair: Documentation; System extensions
.. _contribute-to-system-extension:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: pair: Documentation; Third-party extensions
.. _contribute-to-3rdparty-extension:

Expand Down
1 change: 0 additions & 1 deletion Documentation/WritingDocForExtension/Index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: Documentation; Extension
.. _writing-doc-for-ext-start:
.. _how-to-start-docs-extension:
Expand Down
9 changes: 6 additions & 3 deletions Documentation/WritingDocForExtension/ReregisterVersions.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: bash

.. _reregister-versions:

Expand All @@ -17,7 +16,9 @@ The created branches can be pushed, to trigger the webhook.
Once done, those branches can be removed again, to keep the repository clean.

With a lot of versions release this task can get very tedious.
To get over it in an efficient way, the following script can help with the task::
To get over it in an efficient way, the following script can help with the task:

.. code-block:: bash
#!/bin/sh
Expand All @@ -40,7 +41,9 @@ To get over it in an efficient way, the following script can help with the task:
rm -rf "/tmp/$EXTENSION"
The script needs to be called with the repository name.
If the script is saved with the name :file:`trigger_documentation_push.sh` this would be executed using this example::
If the script is saved with the name :file:`trigger_documentation_push.sh` this would be executed using this example:

.. code-block:: rst
sh trigger_documentation_push.sh evoWeb/sf_register
Expand Down
1 change: 0 additions & 1 deletion Documentation/WritingDocsOfficial/GithubMethod.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: pair: Official documentation; "Edit on GitHub"
.. _docs-contribute-github-method:

Expand Down
1 change: 0 additions & 1 deletion Documentation/WritingDocsOfficial/HowYouCanHelp.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst

.. _docs-official-how-you-can-help:
.. _how-to-contribute:
Expand Down
1 change: 0 additions & 1 deletion Documentation/WritingDocsOfficial/Index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: Official documentation
.. _contribute:
.. _docs-contribute:
Expand Down
1 change: 0 additions & 1 deletion Documentation/WritingDocsOfficial/LocalEditing.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: Official documentation; Local editing
.. _docs-contribute-git-docker:

Expand Down
17 changes: 12 additions & 5 deletions Documentation/WritingReST/BasicRestSyntax.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index:: reST; Syntax
.. _basic-rest-syntax:

Expand All @@ -17,7 +16,9 @@ Paragraphs
==========

New paragraphs in the output are created by an empty line
between two paragraphs in your reST file::
between two paragraphs in your reST file:

.. code-block:: rst
This is a paragraph.
Expand All @@ -29,12 +30,16 @@ between two paragraphs in your reST file::
Comments
========

Comments can be written like this::
Comments can be written like this:

.. code-block:: rst
.. this is a comment
.. with another line
Or like this::
Or like this:

.. code-block:: rst
.. this is a comment
with another line
Expand Down Expand Up @@ -73,6 +78,8 @@ If you want to use a character, which would create some special reST markup,
with its normal meaning, you must escape it with a prepended "\".

For example surrounding text with "*" signs normally makes it show up in italics. By
escaping the special characters "*" you make the stars normal text characters::
escaping the special characters "*" you make the stars normal text characters:

.. code-block:: rst
\*non-italic\*
4 changes: 3 additions & 1 deletion Documentation/WritingReST/CheatSheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ This is an example with a code block (:rst:`::`) embedded in the sections.

1. Embed an image

Source::
Source:

.. code-block:: rst
/Images/a4.jpg
:class: with-shadow
Expand Down
1 change: 0 additions & 1 deletion Documentation/WritingReST/Index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index::
reStructuredText
reST
Expand Down
5 changes: 3 additions & 2 deletions Documentation/WritingReST/Introduction.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst

.. _writing-rest-introduction:

Expand All @@ -16,7 +15,9 @@ file ending of reST files is :file:`.rst`.
reStructuredText is a markup language for writing documentation. You can
edit the source files using plain text and add reST markup where needed.

For example to create section headers, you use underlines::
For example to create section headers, you use underlines:

.. code-block:: rst
========
Header 1
Expand Down
10 changes: 4 additions & 6 deletions Documentation/WritingReST/Reference/Code/Codeblocks.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index::
reST; Code blocks
reST; syntax highlighting
Expand Down Expand Up @@ -490,11 +489,10 @@ You can change these code blocks like this:
:caption: UpdateShorthandCode.diff
The extension already contains some unit tests that extend `typo3/testing-framework`'s base
-unit test class in directory :file:`Tests/Unit/Hooks` (stripped)::
+unit test class:
+
+.. code-block:: php
+ :caption: <extension_key>/Tests/Unit/Hooks/DataHandlerFlushByTagHookTest.php
-unit test class in directory :file:`Tests/Unit/Hooks` (stripped):
.. code-block:: php
:caption: <extension_key>/Tests/Unit/Hooks/DataHandlerFlushByTagHookTest.php
<?php
namespace Lolli\Enetcache\Tests\Unit\Hooks;
1 change: 0 additions & 1 deletion Documentation/WritingReST/Reference/Code/Confval.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. index::
reST; confval
reST; Configuration values
Expand Down
1 change: 0 additions & 1 deletion Documentation/WritingReST/Reference/Code/Index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.. include:: /Includes.rst.txt
.. highlight:: rst
.. _rest-code:

==============================
Expand Down
9 changes: 6 additions & 3 deletions Documentation/WritingReST/Reference/Code/InlineCode.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

.. include:: /Includes.rst.txt
.. highlight:: rst
.. index::
reST; Inline code
.. _Inline-Code:
Expand Down Expand Up @@ -185,11 +184,15 @@ You need another 'language' to mark up inline?
You are free to define additional text roles *in your project* or even
*on an individual page* as you like. Make use of the `role directive
<http://docutils.sourceforge.net/docs/ref/rst/directives.html#role>`__.
Example: You want 'haskell'? Define that role as derivative of 'code'::
Example: You want 'haskell'? Define that role as derivative of 'code':

.. code-block:: rst
.. role:: haskell(code)
You may then write::
You may then write:

.. code-block:: rst
Here is some :haskell:`haskell inline code` in the sentence.
Expand Down
Loading

0 comments on commit 549acd2

Please sign in to comment.