  In the centre of pre-stellar cores, deuterium fractionation is enhanced due
to the low temperatures and high densities. Therefore, the chemistry of
deuterated molecules can be used to study the earliest stages of star
formation. We analyse the deuterium fractionation of simple molecules,
comparing the level of deuteration in the envelopes of the pre-stellar core
L1544 in Taurus and the protostellar core HH211 in Perseus. We used single-dish
observations of CCH, HCN, HNC, HCO$^+$, and their $^{13}$C-, $^{18}$O- and
D-bearing isotopologues, detected with the Onsala 20m telescope. We derived the
column densities and the deuterium fractions of the molecules. Additionally, we
used radiative transfer simulations and results from chemical modelling to
reproduce the observed molecular lines. We used new collisional rate
coefficients for HNC, HN$^{13}$C, DNC, and DCN that consider the hyperfine
structure of these molecules. We find high levels of deuteration for CCH (10%)
in both sources, consistent with other carbon chains, and moderate levels for
HCN (5-7%) and HNC (8%). The deuterium fraction of HCO$^+$ is enhanced towards
HH211, most likely caused by isotope-selective photodissociation of C$^{18}$O.
Similar levels of deuteration show that the process is likely equally efficient
towards both cores, suggesting that the protostellar envelope still retains the
chemical composition of the original pre-stellar core. The fact that the two
cores are embedded in different molecular clouds also suggests that
environmental conditions do not have a significant effect on the deuteration
within dense cores. Radiative transfer modelling shows that it is necessary to
include the outer layers of the cores to consider the effects of extended
structures. Besides HCO$^+$ observations, HCN observations towards L1544 also
require the presence of an outer diffuse layer where the molecules are
relatively abundant.
