Remove module function wrapper and add matching configurations for dprint and eslint (#7596)

* remove blks first try

* dprint.json seems to be OK, some forgotten functions

* add some more space-after-keyword settings

* server remove blks

* add **/files to dprint exclude

* dprint.js fixes a typo

* add boot.js and bootprefix.js to dprint exclude

* dprint change dprint.json

* add dprint fmt as script

* remove jslint comments

* fix whitespace

* fix whitespace

* remove function-wrapper from geospatial plugin

* fix whitespace

* add function wrapper to dyannotate-startup

* remove dpring.json
This commit is contained in:
Mario Pietsch
2025-03-21 17:22:57 +00:00
committed by GitHub
parent 819d84ecab
commit 8aa558eb2c
511 changed files with 385 additions and 2505 deletions
+1 -2
View File
@@ -6,8 +6,7 @@ module-type: command
--aws command
\*/
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var async,
+1 -2
View File
@@ -6,8 +6,7 @@ module-type: filteroperator
Filter operator for applying encodeuricomponent() to each item, with the addition of converting single quotes to %27, as required by AWS
\*/
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
+1 -2
View File
@@ -6,8 +6,7 @@ module-type: startup
AWS initialisation
\*/
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
+1 -2
View File
@@ -6,8 +6,7 @@ module-type: library
AWS utility functions
\*/
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
@@ -6,10 +6,7 @@ module-type: tiddlerdeserializer
BibTeX file deserializer
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var bibtexParse = require("$:/plugins/tiddlywiki/bibtex/bibtexParse.js");
@@ -46,5 +43,3 @@ exports["application/x-bibtex"] = function(text,fields) {
// Return the output tiddlers
return results;
};
})();
@@ -6,10 +6,7 @@ module-type: info
Initialise $:/info/browser tiddlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.getInfoTiddlerFields = function() {
@@ -78,5 +75,3 @@ exports.getInfoTiddlerFields = function() {
}
return infoTiddlerFields;
};
})();
@@ -7,8 +7,6 @@ Startup code injected as raw markup
\*/
(function() {
// Need to initialise these because we run before bootprefix.js and boot.js
$tw = window.$tw || Object.create(null);
$tw.hooks = $tw.hooks || { names: {}};
@@ -89,5 +87,3 @@ function hookBootTiddlersLoaded() {
text: $tw.utils.stringifyList(log)
});
}
})();
@@ -6,10 +6,7 @@ module-type: startup
Startup initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -135,5 +132,3 @@ exports.startup = function() {
});
});
};
})();
@@ -7,10 +7,6 @@ Utility methods for browser-storage plugin
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
function BrowserStorageUtil(wiki,options) {
@@ -109,5 +105,3 @@ BrowserStorageUtil.prototype.clearLocalStorage = function() {
};
exports.BrowserStorageUtil = BrowserStorageUtil;
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: storyview
Positions tiddlers on a 2D map
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var CecilyStoryView = function(listWidget) {
@@ -141,5 +138,3 @@ CecilyStoryView.prototype.lookupTiddlerInMap = function(title,domNode) {
};
exports.cecily = CecilyStoryView;
})();
@@ -8,10 +8,7 @@ Module to deserialize tiddlers from an old school TiddlyWiki recipe file.
The idea is to process the recipe file recursively, loading tiddlers into the main store using synchronous file operations. The tiddlers have their titles prefixed with the associated marker in curly brackets ("{shadow}", "{tiddler}" etc).
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) {
@@ -80,5 +77,3 @@ exports["text/vnd.tiddlywiki2-recipe"] = function(text,fields) {
});
return tiddlers;
};
})();
@@ -6,15 +6,10 @@ module-type: widget
Edit-codemirror widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var editTextWidgetFactory = require("$:/core/modules/editor/factory.js").editTextWidgetFactory,
CodeMirrorEngine = require("$:/plugins/tiddlywiki/codemirror/engine.js").CodeMirrorEngine;
exports["edit-codemirror"] = editTextWidgetFactory(CodeMirrorEngine,CodeMirrorEngine);
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: library
Text editor engine based on a CodeMirror instance
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var CODEMIRROR_OPTIONS = "$:/config/CodeMirror",
@@ -316,5 +313,3 @@ CodeMirrorEngine.prototype.executeTextOperation = function(operation) {
};
exports.CodeMirrorEngine = $tw.browser ? CodeMirrorEngine : require("$:/core/modules/editor/engines/simple.js").SimpleEngine;
})();
@@ -7,9 +7,6 @@ Confetti manager
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var confetti = require("$:/plugins/tiddlywiki/confetti/confetti.js");
@@ -7,9 +7,6 @@ Confetti widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
-3
View File
@@ -7,9 +7,6 @@ Setup the root widget event handlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -6,10 +6,7 @@ module-type: widget
An override of the raw widget that blocks raw content until the user has consented to accept cookies
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
@@ -65,5 +62,3 @@ RawWidget.prototype.refresh = function(changedTiddlers) {
};
exports.raw = RawWidget;
})();
@@ -6,10 +6,7 @@ module-type: startup
Startup initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -103,5 +100,3 @@ exports.startup = function() {
});
}
};
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: widget
A widget for displaying stacked or grouped bar charts. Derived from http://bl.ocks.org/mbostock/3943967
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget,
@@ -200,5 +197,3 @@ BarWidget.prototype.refresh = function(changedTiddlers) {
};
exports.d3bar = BarWidget;
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: widget
A widget for displaying word clouds. Derived from https://github.com/jasondavies/d3-cloud
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget,
@@ -129,5 +126,3 @@ CloudWidget.prototype.refresh = function(changedTiddlers) {
};
exports.d3cloud = CloudWidget;
})();
@@ -6,10 +6,7 @@ module-type: widget
Dynannotate widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var TextMap = require("$:/plugins/tiddlywiki/dynannotate/textmap.js").TextMap;
@@ -433,5 +430,3 @@ DynannotateWidget.prototype.refresh = function(changedTiddlers) {
};
exports.dynannotate = DynannotateWidget;
})();
@@ -7,9 +7,6 @@ Manages the element spotlight effect
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
function ElementSpotlight() {
@@ -6,10 +6,7 @@ module-type: library
Legacy version of the dyannotate background daemon to track the selection
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var TextMap = require("$:/plugins/tiddlywiki/dynannotate/textmap.js").TextMap;
@@ -100,5 +97,3 @@ LegacySelectionTracker.prototype.findSelectionContainer = function findSelection
};
exports.LegacySelectionTracker = LegacySelectionTracker;
})();
@@ -6,10 +6,7 @@ module-type: library
Background daemon to track the selection
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
function SelectionTracker(wiki,options) {
@@ -167,5 +164,3 @@ SelectionTracker.prototype.performSelectionActions = function(chunks,variables,a
};
exports.SelectionTracker = SelectionTracker;
})();
@@ -10,8 +10,6 @@ Startup the dyannotate background daemon to track the selection
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -60,4 +58,3 @@ exports.startup = function() {
};
})();
@@ -6,10 +6,7 @@ module-type: library
Structure for modelling mapping between a string and its representation in the DOM
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var PREFIX_SUFFIX_LENGTH = 50;
@@ -178,5 +175,3 @@ exports.TextMap.prototype.extractContext = function(startContainer,startOffset,t
suffix: this.string.slice(startPos + text.length, Math.min(startPos + text.length + PREFIX_SUFFIX_LENGTH, this.string.length))
};
};
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: startup
Zoom everything
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -263,5 +260,3 @@ function saveViewportDimensions() {
}
}
}
})();
@@ -8,10 +8,7 @@ ENEX file deserializer
For details see: https://blog.evernote.com/tech/2013/08/08/evernote-export-format-enex/
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// DOMParser = require("$:/plugins/tiddlywiki/xmldom/dom-parser").DOMParser;
@@ -136,4 +133,18 @@ function fixAttachmentReference(contentNode, md5Hash, mimeType, name) {
}
})();
function fixAttachmentReference(contentNode, md5Hash, mimeType, name) {
if(!contentNode) return;
var mediaNode = contentNode.querySelector('en-media[hash="' + md5Hash + '"]');
if(!name) {
throw new Error("name is empty for resource hash" + md5Hash);
}
if(!mediaNode) return;
if(mimeType.indexOf("image/") === 0) {
// find en-media node, replace with image syntax
mediaNode.parentNode.replaceChild($tw.utils.domMaker("p", {text: "[img["+ name + "]]"}), mediaNode);
} else {
// For other than image attachments, we make a link to the tiddler
mediaNode.parentNode.replaceChild($tw.utils.domMaker("p", {text: "[["+ name + "]]"}), mediaNode);
}
}
@@ -6,10 +6,7 @@ module-type: startup
Startup initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var ENABLE_EXTERNAL_ATTACHMENTS_TITLE = "$:/config/ExternalAttachments/Enable",
@@ -123,6 +120,3 @@ function test_makePathRelative() {
test("\\\\SHARE\\Users\\me\\something\\file.png","/SHARE/Users/me/somethingelse/index.html","../something/file.png",{isWindows: true});
test("\\\\SHARE\\Users\\me\\something\\file.png","/C:/Users/me/something/index.html","/SHARE/Users/me/something/file.png",{isWindows: true});
}
})();
@@ -6,10 +6,7 @@ module-type: syncadaptor
A sync adaptor module for synchronising with the local filesystem via node.js APIs
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Get a reference to the file system
@@ -167,5 +164,3 @@ FileSystemAdaptor.prototype.removeTiddlerFileInfo = function(title) {
if(fs) {
exports.adaptorClass = FileSystemAdaptor;
}
})();
@@ -6,10 +6,7 @@ module-type: widget
A copy of the core text widget under a different name
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
@@ -58,5 +55,3 @@ PlainTextNodeWidget.prototype.refresh = function(changedTiddlers) {
};
exports["plain-text"] = PlainTextNodeWidget;
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: widget
An override of the core text widget that automatically linkifies the text
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var TITLE_TARGET_FILTER = "$:/config/Freelinks/TargetFilter";
@@ -164,5 +161,3 @@ TextNodeWidget.prototype.refresh = function(changedTiddlers) {
};
exports.text = TextNodeWidget;
})();
@@ -6,10 +6,7 @@ module-type: library
Geospatial utilities
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js");
@@ -37,5 +34,3 @@ exports.parsePoint = function(str) {
// Return the string now we know it is a valid GeoJSON Point
return json;
}
})();
@@ -6,10 +6,7 @@ module-type: filteroperator
Filter operators for geospatial helpers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js");
@@ -20,5 +17,3 @@ exports.geopoint = function(source,operator,options) {
alt = $tw.utils.parseNumber(operator.operands[2] || "0");
return [JSON.stringify(turf.point([long,lat,alt]))];
};
})();
@@ -6,10 +6,6 @@ module-type: filteroperator
Filter operators for geospatial lookup
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"),
@@ -41,5 +37,3 @@ function getPolygonsContainingPoint(featureCollection,point) {
});
return properties;
}
})();
@@ -6,10 +6,7 @@ module-type: filteroperator
Filter operators for geospatial measurement
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"),
@@ -50,5 +47,3 @@ exports.geonearestpoint = function(source,operator,options) {
return [];
}
};
})();
@@ -6,10 +6,7 @@ module-type: filteroperator
Filter operators for open location code conversions
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var openlocationcode = require("$:/plugins/tiddlywiki/geospatial/openlocationcode.js"),
@@ -51,5 +48,3 @@ exports["olc-encode"] = function(source,operator,options) {
}
return [olc];
};
})();
@@ -6,10 +6,7 @@ module-type: filteroperator
Filter operators for geospatial transformation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"),
@@ -83,6 +80,3 @@ function geojsonOp(geojsonObjects, op) {
});
return turf.featureCollection(resultFeatures);
}
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: startup
Geospatial initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -74,5 +71,3 @@ exports.startup = function() {
}
});
};
})();
@@ -6,12 +6,7 @@ module-type: widget
geobaselayer widget to represent a base layer for a geomap widget. Clone of the data widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.geobaselayer = require("$:/core/modules/widgets/data.js").data;
})();
@@ -6,12 +6,7 @@ module-type: widget
geolayer widget to represent a layer for a geomap widget. Clone of the data widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.geolayer = require("$:/core/modules/widgets/data.js").data;
})();
@@ -6,10 +6,7 @@ module-type: widget
Leaflet map widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
@@ -351,6 +348,3 @@ GeomapWidget.prototype.refresh = function(changedTiddlers) {
};
exports.geomap = GeomapWidget;
})();
@@ -6,10 +6,7 @@ module-type: startup
Runs Google Analytics with the measurement ID in the tiddler `$:/GoogleAnalyticsMeasurementID`
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -55,7 +52,3 @@ exports.startup = function() {
}
}
};
})();
@@ -6,10 +6,6 @@ module-type: widget
Wraps up the fenced code blocks parser for highlight and use in TiddlyWiki5
\*/
(function() {
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var TYPE_MAPPINGS_BASE = "$:/config/HighlightPlugin/TypeMappings/";
@@ -40,5 +36,3 @@ CodeBlockWidget.prototype.postRender = function() {
}
}
};
})();
@@ -6,10 +6,6 @@ module-type: widget
Wraps up the fenced code blocks parser for highlight and use in TiddlyWiki5
\*/
(function() {
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var TYPE_MAPPINGS_BASE = "$:/config/HighlightPlugin/TypeMappings/";
@@ -46,6 +42,4 @@ if(hljs.getLanguage !== undefined) {
}
}
};
}
})();
}
-3
View File
@@ -7,9 +7,6 @@ Anchor widget to represent an innerwiki graphical anchor. Clone of the data widg
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.anchor = require("$:/core/modules/widgets/data.js").data;
@@ -6,10 +6,7 @@ module-type: widget
Widget to display an innerwiki in an iframe
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var DEFAULT_INNERWIKI_TEMPLATE = "$:/plugins/tiddlywiki/innerwiki/template";
@@ -347,5 +344,3 @@ InnerWikiWidget.prototype.saveScreenshot = function(options,callback) {
};
exports.innerwiki = InnerWikiWidget;
})();
@@ -6,10 +6,7 @@ module-type: command
Commands to render tiddlers identified by a filter and save any screenshots identified by <$innerwiki> widgets
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var InnerWikiWidget = require("$:/plugins/tiddlywiki/innerwiki/innerwiki.js").innerwiki;
@@ -79,5 +76,3 @@ Command.prototype.findInnerWikiWidgets = function(widgetNode) {
};
exports.Command = Command;
})();
-3
View File
@@ -6,9 +6,6 @@ module-type: command
The command which executes jasmine on the command line for TiddlyWiki5
\*/
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var jasmine = require("./jasmine-plugin.js");
+1 -5
View File
@@ -6,10 +6,8 @@ module-type: library
The main module of the Jasmine test plugin for TiddlyWiki5
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: true */
"use strict";
var TEST_TIDDLER_FILTER = "[all[tiddlers+shadows]type[application/javascript]tag[$:/tags/test-spec]]";
@@ -157,5 +155,3 @@ exports.runTests = function(callback,specFilter) {
nodeJasmineWrapper.execute(null,specFilter);
}
};
})();
@@ -6,10 +6,7 @@ tags: [[$:/tags/test-spec]]
Tests the wiki based tests
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var TEST_WIKI_TIDDLER_FILTER = "[all[tiddlers+shadows]type[text/vnd.tiddlywiki-multiple]tag[$:/tags/wiki-test-spec]]";
@@ -99,5 +96,3 @@ describe("Wiki-based tests", function() {
}
});
})();
+1 -5
View File
@@ -6,10 +6,8 @@ module-type: startup
The main module of the Jasmine test plugin for TiddlyWiki5
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: true */
"use strict";
var jasmine = require("./jasmine-plugin.js");
@@ -34,5 +32,3 @@ if($tw.browser) {
// We make this check after the commands are run.
exports.after = ["commands"];
}
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: startup
Setup the root widget event handlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var JSZip = require("$:/plugins/tiddlywiki/jszip/jszip.js");
@@ -100,5 +97,3 @@ function downloadZipFile(title,filename) {
document.body.removeChild(link);
}
}
})();
-5
View File
@@ -17,10 +17,7 @@ This wikiparser can be modified using the rules eg:
```
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name = "latex-parser";
@@ -65,5 +62,3 @@ exports.parse = function() {
}
}];
};
})();
-6
View File
@@ -6,10 +6,7 @@ module-type: widget
Wrapper for `katex.min.js` that provides a `<$latex>` widget. It is also available under the alias `<$katex>`
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var katex = require("$:/plugins/tiddlywiki/katex/katex.min.js"),
@@ -94,6 +91,3 @@ KaTeXWidget.prototype.refresh = function(changedTiddlers) {
exports.latex = KaTeXWidget;
exports.katex = KaTeXWidget;
})();
@@ -6,10 +6,7 @@ module-type: texteditoroperation
Text editor operation to make a markdown link
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["make-markdown-link"] = function(event,operation) {
@@ -33,5 +30,3 @@ exports["make-markdown-link"] = function(event,operation) {
operation.newSelStart = operation.selStart + operation.replacement.length;
operation.newSelEnd = operation.newSelStart;
};
})();
@@ -6,10 +6,7 @@ module-type: parser
Wraps up the remarkable parser for use as a Parser in TiddlyWiki
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var r = require("$:/plugins/tiddlywiki/markdown-legacy/remarkable.js");
@@ -337,5 +334,3 @@ var MarkdownParser = function(type, text, options) {
exports["text/x-markdown"] = MarkdownParser;
exports["text/markdown"] = MarkdownParser;
})();
@@ -6,10 +6,7 @@ module-type: texteditoroperation
Text editor operation to make a markdown link
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["make-markdown-link"] = function(event,operation) {
@@ -39,5 +36,3 @@ exports["make-markdown-link"] = function(event,operation) {
operation.newSelStart = operation.selStart + operation.replacement.length;
operation.newSelEnd = operation.newSelStart;
};
})();
@@ -5,7 +5,7 @@ module-type: library
Based on markdown-it-katex v2.0.0 by @waylonflinn https://github.com/waylonflinn/markdown-it-katex | MIT License
\*/
(function(){
/* Process inline math */
/*
Like markdown-it-simplemath, this is a stripped down, simplified version of:
@@ -166,5 +166,4 @@ function math_inline_block(state, silent) {
module.exports = function math_plugin(md, options) {
md.inline.ruler.after('escape', 'math_inline', math_inline);
md.inline.ruler.after('escape', 'math_inline_block', math_inline_block);
};
})();
};
@@ -6,10 +6,7 @@ module-type: library
Wraps up the markdown-it parser for use as a Parser in TiddlyWiki
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var md;
@@ -535,5 +532,3 @@ module.exports = function tiddlyWikiPlugin(markdown,options) {
md.core.ruler.disable('text_join');
md.core.ruler.push('wikify',wikify);
};
})();
-4
View File
@@ -6,10 +6,7 @@ module-type: parser
Wraps up the markdown-it parser for use as a Parser in TiddlyWiki
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var MarkdownIt = require("./markdown-it");
@@ -261,4 +258,3 @@ function MarkdownParser(type,text,options) {
exports["text/markdown"] = MarkdownParser;
exports["text/x-markdown"] = MarkdownParser;
})();
@@ -6,10 +6,7 @@ module-type: startup
Startup initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -21,5 +18,3 @@ exports.synchronous = true;
exports.startup = function() {
window.addEventListener("touchmove", function() {});
};
})();
@@ -6,7 +6,7 @@ module-type: saver
Handles saving changes in the NW.js environment. Not required by TiddlyDesktop, which re-uses the TiddlyFox saver, but useful if you're embedding a single TiddlyWiki document into a NW.js app.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false, netscape: false, Components: false */
@@ -57,5 +57,3 @@ Create an instance of this saver
exports.create = function(wiki) {
return new NodeWebKitSaver(wiki);
};
})();
@@ -6,10 +6,7 @@ module-type: library
A simple HTTP-over-window.postMessage implementation of a standard TiddlyWeb-compatible server. It uses real HTTP to load the individual tiddler JSON files.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Listen for window messages
@@ -86,5 +83,3 @@ function httpGet(url,callback) {
};
http.send();
}
})();
@@ -7,9 +7,6 @@ barcodereader widget for reading barcodes
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
-6
View File
@@ -6,10 +6,7 @@ module-type: macro
Macro to convert a string into a QR Code
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
@@ -69,6 +66,3 @@ function generateQrCode(text,options) {
margin = parseInt((size - qr.getModuleCount() * cellsize) / 2);
return qr.createImgTag(cellsize, margin, size);
}
})();
@@ -6,10 +6,7 @@ module-type: library
Components of a railroad diagram.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var railroad = require("$:/plugins/tiddlywiki/railroad/railroad-diagrams.js");
@@ -287,5 +284,3 @@ exports.components = {
Terminal: Terminal,
Transclusion: Transclusion
};
})();
-5
View File
@@ -33,10 +33,7 @@ pragmas:
\end single|double|none
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var components = require("$:/plugins/tiddlywiki/railroad/components.js").components;
@@ -448,5 +445,3 @@ Parser.prototype.readPragma = function(source,pos) {
/////////////////////////// Exports
exports.parser = Parser;
})();
@@ -6,10 +6,7 @@ module-type: parser
This parser wraps unadorned railroad syntax into a railroad widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var RailroadParser = function(type,text,options) {
@@ -23,6 +20,3 @@ console.log(text);
};
exports["text/vnd.tiddlywiki.railroad"] = RailroadParser;
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: widget
Wrapper for `railroad-diagrams.js` that provides a `<$railroad>` widget.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Parser = require("$:/plugins/tiddlywiki/railroad/parser.js").parser,
@@ -143,5 +140,3 @@ RailroadWidget.prototype.dispatchLink = function(to,event) {
};
exports.railroad = RailroadWidget;
})();
@@ -6,10 +6,7 @@ module-type: startup
A startup module to download every changed tiddler as a JSON file
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -149,5 +146,3 @@ function saveTiddlerFile(tiddler,options) {
link.click();
document.body.removeChild(link);
}
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: library
Read tiddlers from the browser location hash
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Get the hash
@@ -108,5 +105,3 @@ function removeWarningBanner() {
warningWrapper.parentNode.removeChild(warningWrapper);
stylesWrapper.parentNode.removeChild(stylesWrapper);
}
})();
@@ -6,10 +6,7 @@ module-type: storyview
Keeps tiddlers in a stack
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var easing = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // From http://easings.net/#easeInOutCubic
@@ -84,5 +81,3 @@ StackedListView.prototype.remove = function(widget) {
};
exports.stacked = StackedListView;
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: saver
A bare bones saver for Tahoe-LAFS. It just PUTs the new HTML file back to the server at the same URL.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
@@ -53,5 +50,3 @@ Create an instance of this saver
exports.create = function(wiki) {
return new TahoeSaver(wiki);
};
})();
@@ -6,10 +6,7 @@ module-type: command
Command to slice a specified tiddler
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var widget = require("$:/core/modules/widgets/widget.js"),
@@ -54,5 +51,3 @@ Command.prototype.execute = function() {
};
exports.Command = Command;
})();
@@ -6,10 +6,7 @@ module-type: filteroperator
Filter operator returning all the descendents of a tiddler listed in the "list" field
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
@@ -34,5 +31,3 @@ exports["list-children"] = function(source,operator,options) {
});
return Object.keys(children);
};
})();
@@ -16,10 +16,7 @@ var slicer = new textSlicer.Slicer(doc,{
});
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
function Slicer(options) {
@@ -474,5 +471,3 @@ Slicer.prototype.makeTitle = function(prefix) {
};
exports.Slicer = Slicer;
})();
@@ -6,10 +6,7 @@ module-type: startup
Setup the root widget event handlers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var textSlicer = require("$:/plugins/tiddlywiki/text-slicer/modules/slicer.js");
@@ -47,5 +44,3 @@ exports.startup = function() {
});
});
};
})();
@@ -6,10 +6,7 @@ module-type: syncadaptor
A sync adaptor module for synchronising with TiddlyWeb compatible servers
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var CONFIG_HOST_TIDDLER = "$:/config/tiddlyweb/host",
@@ -375,5 +372,3 @@ TiddlyWebAdaptor.prototype.parseEtag = function(etag) {
if($tw.browser && document.location.protocol.substr(0,4) === "http" ) {
exports.adaptorClass = TiddlyWebAdaptor;
}
})();
@@ -6,10 +6,7 @@ module-type: widget
Transclude widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var sliceSeparator = "::";
var sectionSeparator = "##";
@@ -191,5 +188,3 @@ TranscludeWidget.prototype.refresh = function(changedTiddlers) {
};
exports.classictransclude = TranscludeWidget;
})();
-4
View File
@@ -3,9 +3,6 @@ title: $:/macros/tiddlywiki/entry.js
type: application/javascript
module-type: macro
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
@@ -27,4 +24,3 @@ exports.run = function(key,map) {
return "";
}
}
})();
@@ -3,10 +3,7 @@ title: $:/macros/classic/macroadapter.js
type: application/javascript
module-type: module
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this module:
@@ -94,4 +91,3 @@ var paramadapter = {
exports.name = 'macroadapter';
exports.namedapter = namedapter;
exports.paramadapter = paramadapter;
})();
@@ -28,10 +28,7 @@ HTML nodes look like this:
`
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
@@ -196,5 +193,3 @@ WikiTextParser.prototype.subWikifyTerm = function(output,terminatorRegExp) {
};
exports["text/x-tiddlywiki"] = WikiTextParser;
})();
@@ -6,10 +6,7 @@ module-type: module
Rule modules for the wikitext parser
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var macroadapter = require("$:/macros/classic/macroadapter.js");
var textPrimitives = {
@@ -824,5 +821,3 @@ var rules = [
];
exports.rules = rules;
})();
@@ -6,10 +6,7 @@ module-type: utils
Utility class for manipulating Twitter archives
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
function TwitterArchivist(options) {
@@ -315,5 +312,3 @@ function arrayBufferToBase64(arrayBuffer) {
exports.TwitterArchivist = TwitterArchivist;
exports.TwitterArchivistSourceNodeJs = TwitterArchivistSourceNodeJs;
exports.TwitterArchivistSourceBrowser = TwitterArchivistSourceBrowser;
})();
@@ -6,10 +6,7 @@ module-type: command
Read tiddlers from an unzipped Twitter archive
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var widget = require("$:/core/modules/widgets/widget.js");
@@ -49,5 +46,3 @@ Command.prototype.execute = function() {
};
exports.Command = Command;
})();
@@ -6,10 +6,7 @@ module-type: startup
Twitter initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -34,5 +31,3 @@ exports.startup = function() {
});
});
};
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: startup
Twitter initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -23,5 +20,3 @@ exports.startup = function() {
logger.alert("The plugin 'tiddlywiki/twitter' is disabled until this wiki is saved and reloaded again");
}
};
})();
@@ -6,10 +6,7 @@ module-type: widget
Twitter widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
@@ -140,5 +137,3 @@ TwitterWidget.prototype.refresh = function(changedTiddlers) {
};
exports.twitter = TwitterWidget;
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: startup
Startup module for configuring the upgrade plugin
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -22,5 +19,3 @@ exports.startup = function() {
$tw.config.usePasswordVault = true;
$tw.config.disableAutoSave = true;
};
})();
@@ -6,10 +6,7 @@ module-type: tiddlerdeserializer
XLSX file deserializer
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
@@ -26,5 +23,3 @@ exports["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"] = f
// Return the output tiddlers
return importer.getResults();
};
})();
@@ -6,10 +6,7 @@ module-type: library
Class to import an Excel file
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var DEFAULT_IMPORT_SPEC_TITLE = "$:/config/plugins/tiddlywiki/xlsx-utils/default-import-spec";
@@ -201,5 +198,3 @@ XLSXImporter.prototype.findColumns = function(sheet,sheetSize) {
};
exports.XLSXImporter = XLSXImporter;
})();
-5
View File
@@ -6,10 +6,7 @@ module-type: startup
Initialisation
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
// Export name and synchronous status
@@ -25,5 +22,3 @@ exports.startup = function() {
logger.alert("The plugin 'xlsx-utils' requires the 'jszip' plugin to be installed");
}
};
})();
@@ -6,10 +6,7 @@ module-type: command
Command to import an xlsx file
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.info = {
@@ -42,5 +39,3 @@ Command.prototype.execute = function() {
};
exports.Command = Command;
})();