Skip to content

Conversation

@felixfontein
Copy link
Contributor

I noticed that the gallery ID uses Context.id, which was initialized with hash() from some string. Since the value of hash() can change between different invocations of Python, this is not very helpful... I've replaced it with a truncated SHA256 converted to int. It's a bit inefficient, but definitely stable.

I've only used this for one old travel blog that hasn't been updated since 2014, so I never noticed that the gallery IDs change...

(There's another hash() use in the LaTeX parser, but that ID is never used as far as I can see, so I didn't touch it for now.)

@Kwpolska Kwpolska enabled auto-merge (squash) November 2, 2024 21:19
@Kwpolska Kwpolska merged commit 4b73595 into master Nov 2, 2024
7 checks passed
@Kwpolska Kwpolska deleted the hash branch November 2, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants