qiskit-documentation/scripts/js/lib/api
Eric Arellano 1d89837490
Handle Sphinx data type (#1917)
Closes https://github.com/Qiskit/documentation/issues/1401 and
https://github.com/Qiskit/documentation/issues/935.

We reuse `<Attribute>`, which actually works out quite well! It
understands how to parse when the data object has a value assigned to it
like `= "my_value"`. It can also properly detect `isDedicatedPage`.


![image](https://github.com/user-attachments/assets/dd938c50-3182-4573-a678-74271a3b72cf)

There is one weird edge case: Qiskit was improperly using `.. py:data::`
inside a table in `utils.mdx`. Naively, it would cause issues with
trying to render the component inside the table, which does not work. I
fixed it in Qiskit `main`, but it would be too time consuming to fix on
0.35+. So, we now have a line to skip over converting to an `Attribute`
Component if the element is inside a table. That means the table will
continue to render the same as before on those historical docs - the
biggest downside is that anchor links still will be broken for the page.

<img width="863" alt="Screenshot 2024-09-06 at 9 40 51 AM"
src="https://github.com/user-attachments/assets/f7355c1f-ed50-4293-976d-42f02fdf6013">

A follow up will simplify our linters like checking for orphan pages,
since this PR fixes a lot of those problems.
2024-09-06 14:19:11 +00:00
..
conversionPipeline.test.ts-snapshots Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
testdata Reorganize `scripts` folder to prepare for packaging JS scripts (#1742) 2024-07-22 12:53:36 +00:00
HtmlToMdResult.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
Metadata.ts Handle Sphinx data type (#1917) 2024-09-06 14:19:11 +00:00
Pkg.test.ts Remove Qiskit IBM Provider (#1862) 2024-08-23 12:20:46 +00:00
Pkg.ts Migrate qiskit-transpiler-service to qiskit-ibm-transpiler (#1886) 2024-08-28 15:11:23 +00:00
TocGrouping.test.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
TocGrouping.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
addFrontMatter.test.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
addFrontMatter.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
commonParserConfig.ts Reorganize `scripts` folder to prepare for packaging JS scripts (#1742) 2024-07-22 12:53:36 +00:00
conversionPipeline.test.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
conversionPipeline.ts Fix release note image path for Qiskit historical versions (#1914) 2024-09-05 16:15:58 +00:00
dedupeHtmlIds.test.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
dedupeHtmlIds.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
flattenFolders.test.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
flattenFolders.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
generateApiComponents.test.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
generateApiComponents.ts Handle Sphinx data type (#1917) 2024-09-06 14:19:11 +00:00
generateToc.test.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
generateToc.ts Handle Sphinx data type (#1917) 2024-09-06 14:19:11 +00:00
htmlToMd.test.ts Fix release note image path for Qiskit historical versions (#1914) 2024-09-05 16:15:58 +00:00
htmlToMd.ts Fix API aliases being orphaned (#1915) 2024-09-06 13:14:36 +00:00
mergeClassMembers.test.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
mergeClassMembers.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
objectsInv.test.ts Remove Qiskit IBM Provider (#1862) 2024-08-23 12:20:46 +00:00
objectsInv.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
processHtml.test.ts Handle Sphinx data type (#1917) 2024-09-06 14:19:11 +00:00
processHtml.ts Handle Sphinx data type (#1917) 2024-09-06 14:19:11 +00:00
releaseNotes.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
removeMathBlocksIndentation.test.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
removeMathBlocksIndentation.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
saveImages.ts Fix API aliases being orphaned (#1915) 2024-09-06 13:14:36 +00:00
specialCaseResults.test.ts Remove Qiskit IBM Provider (#1862) 2024-08-23 12:20:46 +00:00
specialCaseResults.ts Migrate qiskit-transpiler-service to qiskit-ibm-transpiler (#1886) 2024-08-28 15:11:23 +00:00
sphinxArtifacts.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00
updateLinks.test.ts Remove Qiskit IBM Provider (#1862) 2024-08-23 12:20:46 +00:00
updateLinks.ts Allow running `scripts/js` from other Node projects (#1747) 2024-07-23 17:19:24 +00:00