On Tue, 12 Jan 2021 at 14:31, Matti Picus <matti.pi...@gmail.com> wrote:
>
> Why do code blocks get their own unique "anchor_ref = 'rest_code_' + 
> uuid.uuid4().hex" ref? I would like to have a reproducable build. Could we 
> use a random.randint(0, 0xffff) instead and then random.seed(n) could be set 
> at the beginning of the build.

Lines in a code block must have unique anchors on all pages they
appear on. A UUID guarantees no collisions and requires no special
state tracking. An alternate and more deterministic solution would
need to take the full input file name into account, and keep track of
the number of code blocks already rendered — perhaps doable, but
requires more work, and might be ugly/expose internal details.

Why do you want a reproducible build?

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

-- 
You received this message because you are subscribed to the Google Groups 
"nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nikola-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nikola-discuss/CAMw%2Bj7Ki9Uk2rCYUA%3DHUSUgHs5iGQp1MWhs0ANUJOgjKr1Titw%40mail.gmail.com.

Reply via email to