Как вариант...
<!DOCTYPE html>
<html>
<head>
<script src='https://code.jquery.com/jquery-latest.min.js'></script>
<!--
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
<link rel="stylesheet" type="text/css" href="tmp.css" />
<script src='tmp.js'></script>
-->
<style>
</style>
<script>
$(_ => {
const obj = {
one: 1,
two: 2
}
const re = /#(\S*)/g
$('.aaa').each((i, o) => {
o.innerHTML = o.textContent.replace(re, (str, e) => {
const key = e.toLocaleLowerCase()
if (!obj[key]) return str
return `<a href="http://site.ru/razdel_${obj[key]}/${key}">${e}</a>`
})
})
})
</script>
</head>
<body>
<div class="aaa">Lorem #one</div>
<div class="aaa">Lorem #oNe</div>
<div class="aaa">Lorem #two</div>
<div class="aaa">Lorem #Test</div>
</body>
</html>