From d9b0b1adabf1d8d53526c9ccfaf49f704c84fc1a Mon Sep 17 00:00:00 2001 From: Simon Clark <52653938+jsimonclark@users.noreply.github.com> Date: Mon, 6 May 2024 04:57:46 +0200 Subject: [PATCH] Update ttl_to_rst.py --- sphinx/ttl_to_rst.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sphinx/ttl_to_rst.py b/sphinx/ttl_to_rst.py index b83ddef..6a44fc8 100644 --- a/sphinx/ttl_to_rst.py +++ b/sphinx/ttl_to_rst.py @@ -83,6 +83,10 @@ def entities_to_rst(entities: list[dict]) -> str: rst = "" for item in entities: + # Check if '#' is in the IRI + if '#' not in item['IRI']: + print(f"Skipping IRI without '#': {item['IRI']}") + continue # Skip this entity if no hash is present iri_prefix, iri_suffix = item['IRI'].split("#")