Skip to content

Commit aca8395

Browse files
authored
Merge pull request #2081 from github/rst-auto-id-prefix
Fix id names in rst renders after docutils 0.18
2 parents 22d2d51 + a5d7bbe commit aca8395

3 files changed

Lines changed: 29 additions & 28 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: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ <h1>Robot Framework 7.0</h1>
4343
</ul>
4444
</div>
4545
<a name="installation"></a>
46-
<h2><a href="#toc-entry-1">Installation</a></h2>
46+
<h2><a href="#id113">Installation</a></h2>
4747
<p>If you have <a href="http://pip-installer.org">pip</a> installed, just run</p>
4848
<pre>
4949
pip install --upgrade robotframework
@@ -56,7 +56,7 @@ <h2><a href="#toc-entry-1">Installation</a></h2>
5656
from <a href="https://pypi.python.org/pypi/robotframework">PyPI</a> and install it manually. For more details and other installation
5757
approaches, see the <a href="../../INSTALL.rst">installation instructions</a>.</p>
5858
<a name="most-important-enhancements"></a>
59-
<h2><a href="#toc-entry-2">Most important enhancements</a></h2>
59+
<h2><a href="#id114">Most important enhancements</a></h2>
6060
<blockquote>
6161
<p>If you are interested to learn more about the new features in Robot Framework 7.0,
6262
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
@@ -68,7 +68,7 @@ <h2><a href="#toc-entry-2">Most important enhancements</a></h2>
6868
used for future Robot Framework development.</p>
6969
</blockquote>
7070
<a name="listener-enhancements"></a>
71-
<h3><a href="#toc-entry-3">Listener enhancements</a></h3>
71+
<h3><a href="#id115">Listener enhancements</a></h3>
7272
<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
7373
notifications about various events during execution and it also allows modifying
7474
data and results on the fly. It is not typically directly used by normal Robot
@@ -175,7 +175,7 @@ <h4>Paths are passed to version 3 listeners as <code>pathlib.Path</code> objects
175175
paths were strings, but nowadays listener version 3 methods get them as
176176
more convenient <a href="https://docs.python.org/3/library/pathlib.html">pathlib.Path</a> objects.</p>
177177
<a name="native-var-syntax"></a>
178-
<h3><a href="#toc-entry-4">Native <code>VAR</code> syntax</a></h3>
178+
<h3><a href="#id116">Native <code>VAR</code> syntax</a></h3>
179179
<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
180180
as well as global, suite and test/task scoped variables dynamically during
181181
execution. The motivation is to have a more convenient syntax than using
@@ -241,7 +241,7 @@ <h3><a href="#toc-entry-4">Native <code>VAR</code> syntax</a></h3>
241241
IF 1 &gt; 0 VAR ${x} true value ELSE VAR ${x} false value
242242
</pre>
243243
<a name="mixed-argument-support-with-library-keywords"></a>
244-
<h3><a href="#toc-entry-5">Mixed argument support with library keywords</a></h3>
244+
<h3><a href="#id117">Mixed argument support with library keywords</a></h3>
245245
<p>User keywords got support to use both embedded and normal arguments in Robot
246246
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
247247
(<a href="https://github.com/robotframework/robotframework/issues/4710">#4710</a>). The syntax works so, that if a function or method implementing a keyword
@@ -262,7 +262,7 @@ <h3><a href="#toc-entry-5">Mixed argument support with library keywords</a></h3>
262262
Number of dogs should be 3
263263
</pre>
264264
<a name="json-result-format"></a>
265-
<h3><a href="#toc-entry-6">JSON result format</a></h3>
265+
<h3><a href="#id118">JSON result format</a></h3>
266266
<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>
267267
and Robot Framework 7.0 extends the JSON serialization support to execution results
268268
(<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
@@ -289,7 +289,7 @@ <h3><a href="#toc-entry-6">JSON result format</a></h3>
289289
<p>The plan is to enhance the support for JSON output files in the future so that
290290
they could be created already during execution. For more details see issue <a href="https://github.com/robotframework/robotframework/issues/3423">#3423</a>.</p>
291291
<a name="argument-conversion-enhancements"></a>
292-
<h3><a href="#toc-entry-7">Argument conversion enhancements</a></h3>
292+
<h3><a href="#id119">Argument conversion enhancements</a></h3>
293293
<p>Automatic argument conversion is a very powerful feature that library developers
294294
can use to avoid converting arguments manually and to get more useful Libdoc
295295
documentation. There are two important new enhancements to it.</p>
@@ -334,7 +334,7 @@ <h4>Support &quot;stringified&quot; types like <code>'list[int]'</code> and <co
334334
<p>These stringified types are also compatible with the Remote library API and other
335335
scenarios where using actual types is not possible.</p>
336336
<a name="tags-set-globally-can-be-removed-using-tag-syntax"></a>
337-
<h3><a href="#toc-entry-8">Tags set globally can be removed using <code>-tag</code> syntax</a></h3>
337+
<h3><a href="#id120">Tags set globally can be removed using <code>-tag</code> syntax</a></h3>
338338
<p>Individual tests and keywords can nowadays remove tags that have been set in
339339
the Settings section with <code>Test Tags</code> or <code>Keyword Tags</code> settings by using
340340
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,
@@ -358,15 +358,15 @@ <h3><a href="#toc-entry-8">Tags set globally can be removed using <code>-tag</co
358358
deprecated (<a href="https://github.com/robotframework/robotframework/issues/4365">#4365</a>) and using the new <code>-tag</code> syntax is recommended. With
359359
keywords there was no similar functionality earlier.</p>
360360
<a name="dynamic-and-hybrid-library-apis-support-asynchronous-execution"></a>
361-
<h3><a href="#toc-entry-9">Dynamic and hybrid library APIs support asynchronous execution</a></h3>
361+
<h3><a href="#id121">Dynamic and hybrid library APIs support asynchronous execution</a></h3>
362362
<p>Dynamic and hybrid libraries nowadays support asynchronous execution.
363363
In practice the special methods like <code>get_keyword_names</code> and <code>run_keyword</code>
364364
can be implemented as async methods (<a href="https://github.com/robotframework/robotframework/issues/4803">#4803</a>).</p>
365365
<p>Async support was added to the normal static library API in Robot Framework
366366
6.1 (<a href="https://github.com/robotframework/robotframework/issues/4089">#4089</a>). A bug related to handling asynchronous keywords if execution
367367
is stopped gracefully has also been fixed (<a href="https://github.com/robotframework/robotframework/issues/4808">#4808</a>).</p>
368368
<a name="timestamps-in-result-model-and-output-xml-use-standard-format"></a>
369-
<h3><a href="#toc-entry-10">Timestamps in result model and output.xml use standard format</a></h3>
369+
<h3><a href="#id122">Timestamps in result model and output.xml use standard format</a></h3>
370370
<p>Timestamps used in the result model and stored to the output.xml file used custom
371371
format like <code>20231107 19:57:01.123</code> earlier. Non-standard formats are seldom
372372
a good idea, and in this case parsing the custom format turned out to be slow
@@ -398,18 +398,18 @@ <h3><a href="#toc-entry-10">Timestamps in result model and output.xml use standa
398398
that process timestamps. This is discussed more in <a href="#changes-to-output-xml">Changes to output.xml</a>
399399
section below along with other output.xml changes.</p>
400400
<a name="dark-mode-support-to-report-and-log"></a>
401-
<h3><a href="#toc-entry-11">Dark mode support to report and log</a></h3>
401+
<h3><a href="#id123">Dark mode support to report and log</a></h3>
402402
<p>Report and log got a new dark mode (<a href="https://github.com/robotframework/robotframework/issues/3725">#3725</a>). It is enabled automatically based
403403
on browser and operating system preferences, but there is also a toggle to
404404
switch between the modes.</p>
405405
<a name="backwards-incompatible-changes"></a>
406-
<h2><a href="#toc-entry-12">Backwards incompatible changes</a></h2>
406+
<h2><a href="#id124">Backwards incompatible changes</a></h2>
407407
<a name="python-3-6-and-3-7-are-no-longer-supported"></a>
408-
<h3><a href="#toc-entry-13">Python 3.6 and 3.7 are no longer supported</a></h3>
408+
<h3><a href="#id125">Python 3.6 and 3.7 are no longer supported</a></h3>
409409
<p>Robot Framework 7.0 requires Python 3.8 or newer (<a href="https://github.com/robotframework/robotframework/issues/4294">#4294</a>). The last version
410410
that supports Python 3.6 and 3.7 is Robot Framework 6.1.1.</p>
411411
<a name="changes-to-output-xml"></a>
412-
<h3><a href="#toc-entry-14">Changes to output.xml</a></h3>
412+
<h3><a href="#id126">Changes to output.xml</a></h3>
413413
<p>The output.xml file has changed in different ways making Robot Framework 7.0
414414
incompatible with external tools processing output.xml files until these tools
415415
are updated. We try to avoid this kind of breaking changes, but in this case
@@ -479,7 +479,7 @@ <h4>Schema updates</h4>
479479
<p>The output.xml schema has been updated and can be found via
480480
<a href="https://github.com/robotframework/robotframework/tree/master/doc/schema/">https://github.com/robotframework/robotframework/tree/master/doc/schema/</a>.</p>
481481
<a name="changes-to-result-model"></a>
482-
<h3><a href="#toc-entry-15">Changes to result model</a></h3>
482+
<h3><a href="#id127">Changes to result model</a></h3>
483483
<p>There have been some changes to the result model that unfortunately affect
484484
external tools using it. The main motivation for these changes has been
485485
cleaning up the model before creating a JSON representation for it (<a href="https://github.com/robotframework/robotframework/issues/4847">#4847</a>).</p>
@@ -520,7 +520,7 @@ <h4>Deprecated attributes have been removed</h4>
520520
<p>Additionally, <code>TestSuite.keywords</code> and <code>TestCase.keywords</code> have been removed
521521
from the execution model.</p>
522522
<a name="changes-to-parsing-model"></a>
523-
<h3><a href="#toc-entry-16">Changes to parsing model</a></h3>
523+
<h3><a href="#id128">Changes to parsing model</a></h3>
524524
<p>There have been some changes also to the parsing model:</p>
525525
<ul>
526526
<li><p>The node representing the deprecated <code>[Return]</code> setting has been renamed from
@@ -547,7 +547,7 @@ <h3><a href="#toc-entry-16">Changes to parsing model</a></h3>
547547
</li>
548548
</ul>
549549
<a name="changes-to-libdoc-spec-files"></a>
550-
<h3><a href="#toc-entry-17">Changes to Libdoc spec files</a></h3>
550+
<h3><a href="#id129">Changes to Libdoc spec files</a></h3>
551551
<p>The following deprecated constructs have been removed from Libdoc spec files (<a href="https://github.com/robotframework/robotframework/issues/4667">#4667</a>):</p>
552552
<ul>
553553
<li><code>datatypes</code> have been removed from XML or JSON spec files. They were deprecated in
@@ -561,7 +561,7 @@ <h3><a href="#toc-entry-17">Changes to Libdoc spec files</a></h3>
561561
<p>Libdoc schema files have been updated and can be found via
562562
<a href="https://github.com/robotframework/robotframework/tree/master/doc/schema/">https://github.com/robotframework/robotframework/tree/master/doc/schema/</a>.</p>
563563
<a name="changes-to-selecting-tests-with-suite-test-and-include"></a>
564-
<h3><a href="#toc-entry-18">Changes to selecting tests with <code>--suite</code>, <code>--test</code> and <code>--include</code></a></h3>
564+
<h3><a href="#id130">Changes to selecting tests with <code>--suite</code>, <code>--test</code> and <code>--include</code></a></h3>
565565
<p>There are two changes related to selecting tests:</p>
566566
<ul>
567567
<li>When using <code>--test</code> and <code>--include</code> together, tests matching either of them
@@ -571,7 +571,7 @@ <h3><a href="#toc-entry-18">Changes to selecting tests with <code>--suite</code>
571571
the prefix matched the closest parent or parents.</li>
572572
</ul>
573573
<a name="other-backwards-incompatible-changes"></a>
574-
<h3><a href="#toc-entry-19">Other backwards incompatible changes</a></h3>
574+
<h3><a href="#id131">Other backwards incompatible changes</a></h3>
575575
<ul>
576576
<li>The default value of the <code>stdin</code> argument used with <code>Process</code> library keyword
577577
has been changed from <code>subprocess.PIPE</code> to <code>None</code> (<a href="https://github.com/robotframework/robotframework/issues/4103">#4103</a>). This change ought
@@ -601,9 +601,9 @@ <h3><a href="#toc-entry-19">Other backwards incompatible changes</a></h3>
601601
<code>timestr_to_secs</code> utility function (<a href="https://github.com/robotframework/robotframework/issues/4861">#4861</a>).</li>
602602
</ul>
603603
<a name="deprecations"></a>
604-
<h2><a href="#toc-entry-20">Deprecations</a></h2>
604+
<h2><a href="#id132">Deprecations</a></h2>
605605
<a name="return-setting"></a>
606-
<h3><a href="#toc-entry-21"><code>[Return]</code> setting</a></h3>
606+
<h3><a href="#id133"><code>[Return]</code> setting</a></h3>
607607
<p>The <code>[Return]</code> setting for specifying the return value from user keywords has
608608
been &quot;loudly&quot; deprecated (<a href="https://github.com/robotframework/robotframework/issues/4876">#4876</a>). It has been &quot;silently&quot; deprecated since
609609
Robot Framework 5.0 when the much more versatile <code>RETURN</code> setting was introduced
@@ -615,12 +615,12 @@ <h3><a href="#toc-entry-21"><code>[Return]</code> setting</a></h3>
615615
not support <code>RETURN</code>, you can use the <code>Return From Keyword</code> keyword instead.
616616
That keyword will eventually be deprecated and removed as well, though.</p>
617617
<a name="singular-section-headers"></a>
618-
<h3><a href="#toc-entry-22">Singular section headers</a></h3>
618+
<h3><a href="#id134">Singular section headers</a></h3>
619619
<p>Using singular section headers like <code>*** Test Case ***</code> or <code>*** Setting ***</code>
620620
nowadays causes a deprecation warning (<a href="https://github.com/robotframework/robotframework/issues/4432">#4432</a>). They were silently deprecated
621621
in Robot Framework 6.0 for reasons explained in issue <a href="https://github.com/robotframework/robotframework/issues/4431">#4431</a>.</p>
622622
<a name="deprecated-attributes-in-parsing-running-and-result-models"></a>
623-
<h3><a href="#toc-entry-23">Deprecated attributes in parsing, running and result models</a></h3>
623+
<h3><a href="#id135">Deprecated attributes in parsing, running and result models</a></h3>
624624
<ul>
625625
<li>In the parsing model, <code>For.variables</code>, <code>ForHeader.variables</code>, <code>Try.variable</code> and
626626
<code>ExceptHeader.variable</code> attributes have been deprecated in favor of the new <code>assign</code>
@@ -640,7 +640,7 @@ <h3><a href="#toc-entry-23">Deprecated attributes in parsing, running and result
640640
<code>name</code>, <code>owner</code> and <code>source_name</code> instead.</li>
641641
</ul>
642642
<a name="other-deprecated-features"></a>
643-
<h3><a href="#toc-entry-24">Other deprecated features</a></h3>
643+
<h3><a href="#id136">Other deprecated features</a></h3>
644644
<ul>
645645
<li>Using embedded arguments with a variable that has a value not matching custom
646646
embedded argument patterns nowadays causes a deprecation warning (<a href="https://github.com/robotframework/robotframework/issues/4524">#4524</a>).
@@ -663,7 +663,7 @@ <h3><a href="#toc-entry-24">Other deprecated features</a></h3>
663663
has been deprecated (<a href="https://github.com/robotframework/robotframework/issues/4862">#4862</a>).</li>
664664
</ul>
665665
<a name="acknowledgements"></a>
666-
<h2><a href="#toc-entry-25">Acknowledgements</a></h2>
666+
<h2><a href="#id137">Acknowledgements</a></h2>
667667
<p>Robot Framework development is sponsored by the <a href="http://robotframework.org/foundation">Robot Framework Foundation</a>
668668
and its over 60 member organizations. If your organization is using Robot Framework
669669
and benefiting from it, consider joining the foundation to support its
@@ -700,7 +700,7 @@ <h2><a href="#toc-entry-25">Acknowledgements</a></h2>
700700
<div>Robot Framework lead developer</div>
701701
</div>
702702
<a name="full-list-of-fixes-and-enhancements"></a>
703-
<h2><a href="#toc-entry-26">Full list of fixes and enhancements</a></h2>
703+
<h2><a href="#id138">Full list of fixes and enhancements</a></h2>
704704
<table>
705705

706706

test/markups/README.rst.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h2 id="subtitle">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>
@@ -96,7 +96,7 @@ <h2><a href="#toc-entry-1">Header 2</a></h2>
9696
</a>
9797
<img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/621/badge.svg">
9898
<a name="field-list"></a>
99-
<h2><a href="#toc-entry-2">Field list</a></h2>
99+
<h2><a href="#id2">Field list</a></h2>
100100
<table frame="void" rules="none">
101101

102102

0 commit comments

Comments
 (0)