diff --git a/README.md b/README.md
index 96d89c8..c80edb4 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Here is an example usage of **ziba.js**:
Notice that the text and the href are the same.
- Here is another one fource
+ Here is another one fource
This ziba tag will get turned into fource
Notice that the href now has the value of the title of the ziba-link
diff --git a/ziba.js b/ziba.js
index c598a7d..b8eef95 100644
--- a/ziba.js
+++ b/ziba.js
@@ -67,9 +67,9 @@ function transform_link(rootElement) {
anchor.innerHTML = element.innerHTML
let ref = element.innerText
- const elementTitle = element.getAttribute("title")
- if (elementTitle) {
- ref = elementTitle
+ const elementName = element.getAttribute("name")
+ if (elementName) {
+ ref = elementName
}
const transform = element.getAttribute("transform")
diff --git a/ziba_test.js b/ziba_test.js
index 03749eb..a8d24b2 100644
--- a/ziba_test.js
+++ b/ziba_test.js
@@ -44,26 +44,26 @@ function testTransform() {
{
- html:'once',
+ html:'once',
expected:'once',
},
{
- html:'twice',
+ html:'twice',
expected:'twice',
},
{
- html:'thrice',
+ html:'thrice',
expected:'thrice',
},
{
- html:'fource',
+ html:'fource',
expected:'fource',
},
{
- html:'ONCE TWICE THRICE FOURCE',
+ html:'ONCE TWICE THRICE FOURCE',
expected:'ONCE TWICE THRICE FOURCE',
},
@@ -285,7 +285,6 @@ function testTransform() {
},
]
-
tests.forEach(function(test, testNumber){
if (undefined === ziba.transform) {
console.error("[test-tramsform] For test", testNumber, "ziba.transform is undefined.")
@@ -312,5 +311,4 @@ function testTransform() {
console.log("[test-tramsform] Test №", testNumber, "passed.")
})
-
}