Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
libre
marka
Commits
dc52a918
Commit
dc52a918
authored
Jan 27, 2016
by
Smari McCarthy
Browse files
Use original value as basis for everything
parent
35a76333
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
js/marka.js
js/marka.js
+6
-2
No files found.
js/marka.js
View file @
dc52a918
...
...
@@ -59,12 +59,17 @@ Marka.prototype.match = function() {
find
:
regex
,
wrap
:
this
.
wrapNode
()
})
$
(
"
.marka
"
).
each
(
function
(
index
,
value
)
{
var
node
=
$
(
value
);
node
.
data
(
"
original_value
"
,
node
.
text
());
});
};
Marka
.
prototype
.
doConversions
=
function
()
{
var
self
=
this
;
$
(
"
.marka
"
).
each
(
function
(
index
,
value
)
{
var
text
=
$
(
value
).
text
(
);
var
text
=
$
(
value
).
data
(
"
original_value
"
);
var
res
=
self
.
splitSymbols
(
text
);
if
(
res
===
false
)
{
$
(
value
).
replaceWith
(
text
)
...
...
@@ -81,7 +86,6 @@ Marka.prototype.doConversions = function() {
}
node
.
append
(
children
);
node
.
children
(
"
.marka-results
"
).
html
(
"
<span class=
\"
marka-result
\"
>
"
+
node
.
data
(
"
original_value
"
)
+
"
</span>
"
)
})
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment