mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
lint: useless comments
This commit is contained in:
parent
856cb42039
commit
3cf93d08e5
@ -48,9 +48,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'element', tag: 'strong', children: [{ type: 'text', text: 'bold' }] }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string with the opening delimiter
|
||||
var serialized = "''";
|
||||
// Serialize the children of the bold element
|
||||
serialized += serialize(tree.children);
|
||||
|
@ -48,9 +48,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'element', tag: 'em', children: [{ type: 'text', text: 'italic' }] }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string with the opening delimiter
|
||||
var serialized = "//";
|
||||
// Serialize the children of the italic element
|
||||
serialized += serialize(tree.children);
|
||||
|
@ -48,9 +48,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'element', tag: 'strike', children: [{ type: 'text', text: 'strikethrough' }] }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string with the opening delimiter
|
||||
var serialized = "~~";
|
||||
// Serialize the children of the strikethrough element
|
||||
serialized += serialize(tree.children);
|
||||
|
@ -48,9 +48,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'element', tag: 'sub', children: [{ type: 'text', text: 'subscript' }] }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string with the opening delimiter
|
||||
var serialized = ",,";
|
||||
// Serialize the children of the subscript element
|
||||
serialized += serialize(tree.children);
|
||||
|
@ -48,9 +48,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'element', tag: 'sup', children: [{ type: 'text', text: 'superscript' }] }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string with the opening delimiter
|
||||
var serialized = "^^";
|
||||
// Serialize the children of the superscript element
|
||||
serialized += serialize(tree.children);
|
||||
|
@ -48,9 +48,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'element', tag: 'u', children: [{ type: 'text', text: 'underscore' }] }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string with the opening delimiter
|
||||
var serialized = "__";
|
||||
// Serialize the children of the underscore element
|
||||
serialized += serialize(tree.children);
|
||||
|
@ -74,7 +74,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function (tree, serialize) {
|
||||
// tree: { type: "element", tag: "blockquote", attributes: { class: { type: "string", value: "tc-quote" } }, children: [{ type: "element", tag: "cite", children: [{ type: "text", text: "tc-quote" }] }, { type: "element", tag: "p", children: [{ type: "text", text: "Quote text\n" }] }] }
|
||||
var result = [];
|
||||
if(tree.type === "element" && tree.tag === "blockquote") {
|
||||
// tree.attributes.class.value: "tc-quote"
|
||||
|
@ -69,7 +69,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function (tree, serialize) {
|
||||
// tree: { type: "void", attributes: { action: { type: "string", value: "except" }, rules: { type: "string", value: "ruleone ruletwo rulethree" } }, children: [{ type: "void", attributes: { action: { type: "string", value: "only" }, rules: { type: "string", value: "ruleone ruletwo rulethree" } }, children: [] }] }
|
||||
var result = [];
|
||||
if(tree.attributes.action && tree.attributes.rules) {
|
||||
// tree.attributes.action.value: "except"
|
||||
|
@ -74,7 +74,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// serialize: function that serializes an array of nodes or a single node to a string
|
||||
var lines = [];
|
||||
var classes = [];
|
||||
var styles = [];
|
||||
|
@ -56,8 +56,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: {type: "element", tag: "span", children: [...], attributes: {class: {name: "class", type: "string", value: " myClass "}, style: {name: "style", type: "string", value: "background-color:red;"}}, orderedAttributes: [...], start: 0, end: 43, rule: "styleinline"}
|
||||
// serialize: function that accepts an array of nodes or a single node and returns a string
|
||||
var result = "@@";
|
||||
// Add styles if present
|
||||
if(tree.attributes && tree.attributes.style) {
|
||||
|
@ -51,11 +51,9 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'link', attributes: { to: { type: 'string', value: '$:TiddlerTitle' } }, children: [{ type: 'text', text: '$:TiddlerTitle' }] }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Check if the link is suppressed
|
||||
var isSuppressed = tree.children[0].text.substr(0,1) === "~";
|
||||
// Initialize the serialized string
|
||||
|
||||
var serialized = isSuppressed ? "~" : "";
|
||||
// Append the link value
|
||||
serialized += tree.attributes.to.value;
|
||||
|
@ -87,9 +87,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'transclude', attributes: { $tiddler: { name: '$tiddler', type: 'string', value: 'MyTiddler' }, $field: { name: '$field', type: 'string', value: 'text' } }, isBlock: true }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string
|
||||
var serialized = "{{";
|
||||
// Check for tiddler attribute
|
||||
if(tree.attributes.$tiddler) {
|
||||
|
@ -85,9 +85,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'transclude', attributes: { $tiddler: { name: '$tiddler', type: 'string', value: 'MyTiddler' }, $field: { name: '$field', type: 'string', value: 'text' } } }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string
|
||||
var serialized = "{{";
|
||||
// Check for tiddler attribute
|
||||
if(tree.attributes.$tiddler) {
|
||||
|
@ -84,9 +84,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function (tree, serialize) {
|
||||
// tree: { type: 'element', tag: 'pre', children: [{ type: 'text', text: 'This will be rendered as JavaScript' }] }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string with the opening delimiter and type
|
||||
var serialized = '$$$'; // Extract the type from the tree node (assuming it's stored in a specific attribute)
|
||||
if(tree.attributes && tree.attributes.type) {
|
||||
serialized += tree.attributes.type.value;
|
||||
|
@ -66,11 +66,9 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'link', attributes: { to: { type: 'string', value: 'AWikiLink' } }, children: [{ type: 'text', text: 'AWikiLink' }] }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Check if the link is suppressed
|
||||
var isSuppressed = tree.children[0].text.substr(0,1) === $tw.config.textPrimitives.unWikiLink;
|
||||
// Initialize the serialized string
|
||||
|
||||
var serialized = isSuppressed ? $tw.config.textPrimitives.unWikiLink : "";
|
||||
// Append the link text
|
||||
serialized += tree.attributes.to.value;
|
||||
|
@ -38,9 +38,6 @@ exports.parse = function() {
|
||||
};
|
||||
|
||||
exports.serialize = function(tree, serialize) {
|
||||
// tree: { type: 'text', text: 'SuppressedLink' }
|
||||
// serialize: function that accepts array of nodes or a node and returns a string
|
||||
// Initialize the serialized string with the unwikilink character
|
||||
var serialized = $tw.config.textPrimitives.unWikiLink;
|
||||
// Append the text
|
||||
serialized += tree.text;
|
||||
|
Loading…
Reference in New Issue
Block a user