x^^2^^
What would you do with this span?
Good luck, Thomas
Start of the line would do just fine.
Span should end right after the opening Span. That is, the content between the Span should be null. I have specified the content using CSS, as you can see
I cloned the wikiparser for strike-through (and heading) and tried to change wherever the ~~ happens and finally the element: strike line.
I wouldn't mind any symbol on the keyboard to be parsed thus
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/loz80ybEoqo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ce606da1-f358-49af-ab82-5c27dfd2eb10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
/*\
title: $:/core/modules/parsers/wikiparser/rules/indent.js
type: application/javascript
module-type: wikirule
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name = "indent";
exports.types = {inline: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /\\ /mg;
};
exports.parse = function() {
// Move past the match
this.parser.pos = this.matchRegExp.lastIndex;
var node = {
type: "element",
tag: "span",
attributes: {
"style": {type: "string", value: "padding-left:20px;content:''"}
},
children: []
};
return [node];
};
})();
Just my two cents
I am trying to get TW5 to parse the symbol ^ as <span style="padding-left:20px;content:''"></span>
Now you can use the following syntax:
*.x indent 1
**.x indent 2
@ BJ and PMario
Both of those methods works and opens an array of possibilites. Thanks you :-)
I think that using an invisible character as part of a formatting rule is an horrible idea.Just my two cents
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/23519ee3-cba6-4c2c-95c3-9858c7253961%40googlegroups.com.