mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-11 17:14:57 +02:00
fix typos in variable names
This commit is contained in:
@@ -313,17 +313,17 @@ const Plugin = () => {
|
|||||||
*/
|
*/
|
||||||
function addAttributeInElement( node, elementTarget, separator ) {
|
function addAttributeInElement( node, elementTarget, separator ) {
|
||||||
|
|
||||||
var mardownClassesInElementsRegex = new RegExp( separator, 'mg' );
|
var markdownClassesInElementsRegex = new RegExp( separator, 'mg' );
|
||||||
var mardownClassRegex = new RegExp( "([^\"= ]+?)=\"([^\"]+?)\"|(data-[^\"= ]+?)(?=[\" ])", 'mg' );
|
var markdownClassRegex = new RegExp( "([^\"= ]+?)=\"([^\"]+?)\"|(data-[^\"= ]+?)(?=[\" ])", 'mg' );
|
||||||
var nodeValue = node.nodeValue;
|
var nodeValue = node.nodeValue;
|
||||||
var matches,
|
var matches,
|
||||||
matchesClass;
|
matchesClass;
|
||||||
if( matches = mardownClassesInElementsRegex.exec( nodeValue ) ) {
|
if( matches = markdownClassesInElementsRegex.exec( nodeValue ) ) {
|
||||||
|
|
||||||
var classes = matches[1];
|
var classes = matches[1];
|
||||||
nodeValue = nodeValue.substring( 0, matches.index ) + nodeValue.substring( mardownClassesInElementsRegex.lastIndex );
|
nodeValue = nodeValue.substring( 0, matches.index ) + nodeValue.substring( markdownClassesInElementsRegex.lastIndex );
|
||||||
node.nodeValue = nodeValue;
|
node.nodeValue = nodeValue;
|
||||||
while( matchesClass = mardownClassRegex.exec( classes ) ) {
|
while( matchesClass = markdownClassRegex.exec( classes ) ) {
|
||||||
if( matchesClass[2] ) {
|
if( matchesClass[2] ) {
|
||||||
elementTarget.setAttribute( matchesClass[1], matchesClass[2] );
|
elementTarget.setAttribute( matchesClass[1], matchesClass[2] );
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user