mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-17 15:24:50 +00:00
Make sure the parser rules have unique names
This commit is contained in:
parent
4cf1c9ed1e
commit
c1ec1578ec
@ -20,7 +20,7 @@ Wiki text rule for block-level filtered transclusion. For example:
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.name = "filteredtransclude";
|
exports.name = "filteredtranscludeblock";
|
||||||
exports.types = {block: true};
|
exports.types = {block: true};
|
||||||
|
|
||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
@ -35,7 +35,7 @@ exports.parse = function() {
|
|||||||
// Get the match details
|
// Get the match details
|
||||||
var filter = this.match[1],
|
var filter = this.match[1],
|
||||||
tooltip = this.match[2],
|
tooltip = this.match[2],
|
||||||
template = this.match[3],
|
template = $tw.utils.trim(this.match[3]),
|
||||||
style = this.match[4],
|
style = this.match[4],
|
||||||
classes = this.match[5];
|
classes = this.match[5];
|
||||||
// Return the list widget
|
// Return the list widget
|
||||||
|
@ -20,7 +20,7 @@ Wiki text rule for inline filtered transclusion. For example:
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.name = "filteredtransclude";
|
exports.name = "filteredtranscludeinline";
|
||||||
exports.types = {inline: true};
|
exports.types = {inline: true};
|
||||||
|
|
||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
@ -35,7 +35,7 @@ exports.parse = function() {
|
|||||||
// Get the match details
|
// Get the match details
|
||||||
var filter = this.match[1],
|
var filter = this.match[1],
|
||||||
tooltip = this.match[2],
|
tooltip = this.match[2],
|
||||||
template = this.match[3],
|
template = $tw.utils.trim(this.match[3]),
|
||||||
style = this.match[4],
|
style = this.match[4],
|
||||||
classes = this.match[5];
|
classes = this.match[5];
|
||||||
// Return the list widget
|
// Return the list widget
|
||||||
|
@ -16,7 +16,7 @@ Wiki rule for block macro calls
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.name = "macrocall";
|
exports.name = "macrocallblock";
|
||||||
exports.types = {block: true};
|
exports.types = {block: true};
|
||||||
|
|
||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
|
@ -16,7 +16,7 @@ Wiki rule for macro calls
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.name = "macrocall";
|
exports.name = "macrocallinline";
|
||||||
exports.types = {inline: true};
|
exports.types = {inline: true};
|
||||||
|
|
||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
|
@ -20,7 +20,7 @@ Wiki text rule for block-level transclusion. For example:
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.name = "transclude";
|
exports.name = "transcludeblock";
|
||||||
exports.types = {block: true};
|
exports.types = {block: true};
|
||||||
|
|
||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
@ -33,9 +33,9 @@ exports.parse = function() {
|
|||||||
// Move past the match
|
// Move past the match
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// Get the match details
|
// Get the match details
|
||||||
var targetTitle = this.match[1],
|
var targetTitle = $tw.utils.trim(this.match[1]),
|
||||||
tooltip = this.match[2],
|
tooltip = this.match[2],
|
||||||
template = this.match[3],
|
template = $tw.utils.trim(this.match[3]),
|
||||||
style = this.match[4],
|
style = this.match[4],
|
||||||
classes = this.match[5];
|
classes = this.match[5];
|
||||||
// Return the transclude widget
|
// Return the transclude widget
|
||||||
|
@ -20,7 +20,7 @@ Wiki text rule for inline-level transclusion. For example:
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
exports.name = "transclude";
|
exports.name = "transcludeinline";
|
||||||
exports.types = {inline: true};
|
exports.types = {inline: true};
|
||||||
|
|
||||||
exports.init = function(parser) {
|
exports.init = function(parser) {
|
||||||
@ -33,9 +33,9 @@ exports.parse = function() {
|
|||||||
// Move past the match
|
// Move past the match
|
||||||
this.parser.pos = this.matchRegExp.lastIndex;
|
this.parser.pos = this.matchRegExp.lastIndex;
|
||||||
// Get the match details
|
// Get the match details
|
||||||
var targetTitle = this.match[1],
|
var targetTitle = $tw.utils.trim(this.match[1]),
|
||||||
tooltip = this.match[2],
|
tooltip = this.match[2],
|
||||||
template = this.match[3],
|
template = $tw.utils.trim(this.match[3]),
|
||||||
style = this.match[4],
|
style = this.match[4],
|
||||||
classes = this.match[5];
|
classes = this.match[5];
|
||||||
// Return the transclude widget
|
// Return the transclude widget
|
||||||
|
Loading…
Reference in New Issue
Block a user