Skip to content

Commit d7b5b51

Browse files
pudivaTylerDixon
andcommitted
Fix id names in rst renders after docutils 0.18
Fix id names changing in rst renders with the upgrade to docutils 0.18 by enforcing the old default value `id` for `auto_id_prefix`. See: https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-18-2021-10-26 co-authored-by: Tyler Dixon <tylerdixon@github.com>
1 parent 8c0a553 commit d7b5b51

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

lib/github/commands/rest2html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ SETTINGS = {
160160
'syntax_highlight': 'none',
161161
'math_output': 'latex',
162162
'field_name_limit': 50,
163+
'auto_id_prefix': 'id',
163164
}
164165

165166
default_highlight_language = None

test/markups/README.long.rst.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h1>Robot Framework 7.0</h1>
4646
</ul>
4747
</div>
4848
<a name="installation"></a>
49-
<h2><a href="#toc-entry-1">Installation</a></h2>
49+
<h2><a href="#id113">Installation</a></h2>
5050
<p>If you have <a href="http://pip-installer.org">pip</a> installed, just run</p>
5151
<pre>
5252
pip install --upgrade robotframework
@@ -59,7 +59,7 @@ <h2><a href="#toc-entry-1">Installation</a></h2>
5959
from <a href="https://pypi.python.org/pypi/robotframework">PyPI</a> and install it manually. For more details and other installation
6060
approaches, see the <a href="../../INSTALL.rst">installation instructions</a>.</p>
6161
<a name="most-important-enhancements"></a>
62-
<h2><a href="#toc-entry-2">Most important enhancements</a></h2>
62+
<h2><a href="#id114">Most important enhancements</a></h2>
6363
<blockquote>
6464
<p>If you are interested to learn more about the new features in Robot Framework 7.0,
6565
join the <a href="https://robocon.io">RoboCon conference</a> in February, 2024. <a href="https://github.com/pekkaklarck">Pekka Klärck</a>, Robot Framework
@@ -71,7 +71,7 @@ <h2><a href="#toc-entry-2">Most important enhancements</a></h2>
7171
used for future Robot Framework development.</p>
7272
</blockquote>
7373
<a name="listener-enhancements"></a>
74-
<h3><a href="#toc-entry-3">Listener enhancements</a></h3>
74+
<h3><a href="#id115">Listener enhancements</a></h3>
7575
<p>Robot Framework's <a href="http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#listener-interface">listener interface</a> is a very powerful mechanism to get
7676
notifications about various events during execution and it also allows modifying
7777
data and results on the fly. It is not typically directly used by normal Robot
@@ -179,7 +179,7 @@ <h4>Paths are passed to version 3 listeners as <code>pathlib.Path</code> objects
179179
paths were strings, but nowadays listener version 3 methods get them as
180180
more convenient <a href="https://docs.python.org/3/library/pathlib.html">pathlib.Path</a> objects.</p>
181181
<a name="native-var-syntax"></a>
182-
<h3><a href="#toc-entry-4">Native <code>VAR</code> syntax</a></h3>
182+
<h3><a href="#id116">Native <code>VAR</code> syntax</a></h3>
183183
<p>The new <code>VAR</code> syntax (<a href="https://github.com/robotframework/robotframework/issues/3761">#3761</a>) makes it possible to create local variables
184184
as well as global, suite and test/task scoped variables dynamically during
185185
execution. The motivation is to have a more convenient syntax than using
@@ -245,7 +245,7 @@ <h3><a href="#toc-entry-4">Native <code>VAR</code> syntax</a></h3>
245245
IF 1 &gt; 0 VAR ${x} true value ELSE VAR ${x} false value
246246
</pre>
247247
<a name="mixed-argument-support-with-library-keywords"></a>
248-
<h3><a href="#toc-entry-5">Mixed argument support with library keywords</a></h3>
248+
<h3><a href="#id117">Mixed argument support with library keywords</a></h3>
249249
<p>User keywords got support to use both embedded and normal arguments in Robot
250250
Framework 6.1 (<a href="https://github.com/robotframework/robotframework/issues/4234">#4234</a>) and now that support has been added also to library keywords
251251
(<a href="https://github.com/robotframework/robotframework/issues/4710">#4710</a>). The syntax works so, that if a function or method implementing a keyword
@@ -266,7 +266,7 @@ <h3><a href="#toc-entry-5">Mixed argument support with library keywords</a></h3>
266266
Number of dogs should be 3
267267
</pre>
268268
<a name="json-result-format"></a>
269-
<h3><a href="#toc-entry-6">JSON result format</a></h3>
269+
<h3><a href="#id118">JSON result format</a></h3>
270270
<p>Robot Framework 6.1 added support to <a href="https://github.com/robotframework/robotframework/blob/master/doc/releasenotes/rf-6.1.rst#json-data-format">convert test/task data to JSON and back</a>
271271
and Robot Framework 7.0 extends the JSON serialization support to execution results
272272
(<a href="https://github.com/robotframework/robotframework/issues/4847">#4847</a>). One of the core use cases for data serialization was making it easy to
@@ -293,7 +293,7 @@ <h3><a href="#toc-entry-6">JSON result format</a></h3>
293293
<p>The plan is to enhance the support for JSON output files in the future so that
294294
they could be created already during execution. For more details see issue <a href="https://github.com/robotframework/robotframework/issues/3423">#3423</a>.</p>
295295
<a name="argument-conversion-enhancements"></a>
296-
<h3><a href="#toc-entry-7">Argument conversion enhancements</a></h3>
296+
<h3><a href="#id119">Argument conversion enhancements</a></h3>
297297
<p>Automatic argument conversion is a very powerful feature that library developers
298298
can use to avoid converting arguments manually and to get more useful Libdoc
299299
documentation. There are two important new enhancements to it.</p>
@@ -340,7 +340,7 @@ <h4>Support "stringified" types like <code>'list[int]'</code> and <code>'int |
340340
<p>These stringified types are also compatible with the Remote library API and other
341341
scenarios where using actual types is not possible.</p>
342342
<a name="tags-set-globally-can-be-removed-using-tag-syntax"></a>
343-
<h3><a href="#toc-entry-8">Tags set globally can be removed using <code>-tag</code> syntax</a></h3>
343+
<h3><a href="#id120">Tags set globally can be removed using <code>-tag</code> syntax</a></h3>
344344
<p>Individual tests and keywords can nowadays remove tags that have been set in
345345
the Settings section with <code>Test Tags</code> or <code>Keyword Tags</code> settings by using
346346
the <code>-tag</code> syntax with their own <code>[Tags]</code> setting (<a href="https://github.com/robotframework/robotframework/issues/4374">#4374</a>). For example,
@@ -364,15 +364,15 @@ <h3><a href="#toc-entry-8">Tags set globally can be removed using <code>-tag</co
364364
deprecated (<a href="https://github.com/robotframework/robotframework/issues/4365">#4365</a>) and using the new <code>-tag</code> syntax is recommended. With
365365
keywords there was no similar functionality earlier.</p>
366366
<a name="dynamic-and-hybrid-library-apis-support-asynchronous-execution"></a>
367-
<h3><a href="#toc-entry-9">Dynamic and hybrid library APIs support asynchronous execution</a></h3>
367+
<h3><a href="#id121">Dynamic and hybrid library APIs support asynchronous execution</a></h3>
368368
<p>Dynamic and hybrid libraries nowadays support asynchronous execution.
369369
In practice the special methods like <code>get_keyword_names</code> and <code>run_keyword</code>
370370
can be implemented as async methods (<a href="https://github.com/robotframework/robotframework/issues/4803">#4803</a>).</p>
371371
<p>Async support was added to the normal static library API in Robot Framework
372372
6.1 (<a href="https://github.com/robotframework/robotframework/issues/4089">#4089</a>). A bug related to handling asynchronous keywords if execution
373373
is stopped gracefully has also been fixed (<a href="https://github.com/robotframework/robotframework/issues/4808">#4808</a>).</p>
374374
<a name="timestamps-in-result-model-and-output-xml-use-standard-format"></a>
375-
<h3><a href="#toc-entry-10">Timestamps in result model and output.xml use standard format</a></h3>
375+
<h3><a href="#id122">Timestamps in result model and output.xml use standard format</a></h3>
376376
<p>Timestamps used in the result model and stored to the output.xml file used custom
377377
format like <code>20231107 19:57:01.123</code> earlier. Non-standard formats are seldom
378378
a good idea, and in this case parsing the custom format turned out to be slow
@@ -663,7 +663,7 @@ <h3><a href="#toc-entry-23">Deprecated attributes in parsing, running and result
663663
<code>name</code>, <code>owner</code> and <code>source_name</code> instead.</li>
664664
</ul>
665665
<a name="other-deprecated-features"></a>
666-
<h3><a href="#toc-entry-24">Other deprecated features</a></h3>
666+
<h3><a href="#id136">Other deprecated features</a></h3>
667667
<ul>
668668
<li>Using embedded arguments with a variable that has a value not matching custom
669669
embedded argument patterns nowadays causes a deprecation warning (<a href="https://github.com/robotframework/robotframework/issues/4524">#4524</a>).
@@ -1300,4 +1300,4 @@ <h2><a href="#toc-entry-26">Full list of fixes and enhancements</a></h2>
13001300
</tr>
13011301
</tbody>
13021302
</table>
1303-
<p>Altogether 88 issues. View on the <a href="https://github.com/robotframework/robotframework/issues?q=milestone%3Av7.0">issue tracker</a>.</p>
1303+
<p>Altogether 88 issues. View on the <a href="https://github.com/robotframework/robotframework/issues?q=milestone%3Av7.0">issue tracker</a>.</p>

test/markups/README.rst.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h2>Subtitle</h2>
1010
</div>
1111
<a name="header-2"></a>
1212
<a name="label-for-header-2"></a>
13-
<h2><a href="#toc-entry-1">Header 2</a></h2>
13+
<h2><a href="#id1">Header 2</a></h2>
1414
<ol>
1515
<li>Blah blah <code>code</code> blah</li>
1616
<li>More <code>code</code>, hooray</li>
@@ -109,7 +109,7 @@ <h2><a href="#toc-entry-1">Header 2</a></h2>
109109
</a>
110110
<img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/621/badge.svg">
111111
<a name="field-list"></a>
112-
<h2><a href="#toc-entry-2">Field list</a></h2>
112+
<h2><a href="#id2">Field list</a></h2>
113113
<table frame="void" rules="none">
114114

115115

0 commit comments

Comments
 (0)