Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions sphinx_panels/tabs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
from uuid import uuid4
import os
import random
import time
import uuid

from typing import Optional

from docutils import nodes
Expand All @@ -10,6 +14,9 @@

LOGGER = getLogger(__name__)

rnd = random.Random()
rnd.seed(os.environ.get("SOURCE_DATE_EPOCH", time.time()))


def setup_tabs(app):
app.add_directive("tabbed", TabbedDirective)
Expand Down Expand Up @@ -122,7 +129,7 @@ class TabbedHtmlTransform(SphinxPostTransform):
formats = ("html",)

def get_unique_key(self):
return str(uuid4())
return uuid.UUID(int=rnd.getrandbits(128), version=4).hex

def run(self):
matcher = NodeMatcher(nodes.container, type="tabbed")
Expand Down