doc: Code samples must be referenced using new dedicated role

Drop code that would let people reference samples using legacy
:ref:`sample_id` syntax, and only support the use of
:zephyr:code-sample:`sample_id` role going forward.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2023-09-06 12:21:21 +02:00 committed by Carles Cufí
parent 59e4c5aed0
commit fad29ecb03

View file

@ -94,18 +94,6 @@ class ConvertCodeSampleNode(SphinxTransform):
index = parent.index(node)
siblings_to_move = parent.children[index + 1 :]
# TODO remove once all :ref:`sample-xyz` have migrated to :zephyr:code-sample:`xyz`
# as this is the recommended way to reference code samples going forward.
self.env.app.env.domaindata["std"]["labels"][node["id"]] = (
self.env.docname,
node["id"],
node["name"],
)
self.env.app.env.domaindata["std"]["anonlabels"][node["id"]] = (
self.env.docname,
node["id"],
)
# Create a new section
new_section = nodes.section(ids=[node["id"]])
new_section += nodes.title(text=node["name"])