mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-09-10 23:06:06 +00:00
Get rid of the "new_" prefix we had on some methods
There's still the "old_" prefix to get rid of too.
This commit is contained in:
@@ -25,7 +25,7 @@ describe("Widget module", function() {
|
||||
}
|
||||
|
||||
function parseText(text,wiki,options) {
|
||||
var parser = wiki.new_parseText("text/vnd.tiddlywiki",text,options);
|
||||
var parser = wiki.parseText("text/vnd.tiddlywiki",text,options);
|
||||
return parser ? {type: "widget", children: parser.tree} : undefined;
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,7 @@ describe("WikiText parser tests", function() {
|
||||
|
||||
// Define a parsing shortcut
|
||||
var parse = function(text) {
|
||||
return wiki.new_parseText("text/vnd.tiddlywiki",text).tree;
|
||||
return wiki.parseText("text/vnd.tiddlywiki",text).tree;
|
||||
};
|
||||
|
||||
it("should parse tags", function() {
|
||||
|
@@ -23,27 +23,27 @@ describe("WikiText tests", function() {
|
||||
wiki.addTiddler({title: "TiddlerFour", text: "\\define my-macro(adjective:'groovy')\nThis is my ''amazingly'' $adjective$ macro!\n\\end\n\n<$link to=<<my-macro>>>This is a link</$link>"});
|
||||
|
||||
it("should render tiddlers with no special markup as-is", function() {
|
||||
expect(wiki.new_renderTiddler("text/plain","TiddlerOne")).toBe("The quick brown fox");
|
||||
expect(wiki.renderTiddler("text/plain","TiddlerOne")).toBe("The quick brown fox");
|
||||
});
|
||||
it("should preserve single new lines", function() {
|
||||
expect(wiki.new_renderTiddler("text/plain","TiddlerTwo")).toBe("The rain in Spain\nfalls mainly on the plain");
|
||||
expect(wiki.renderTiddler("text/plain","TiddlerTwo")).toBe("The rain in Spain\nfalls mainly on the plain");
|
||||
});
|
||||
it("should use double new lines to create paragraphs", function() {
|
||||
// The paragraphs are lost in the conversion to plain text
|
||||
expect(wiki.new_renderTiddler("text/plain","TiddlerThree")).toBe("The speed of soundThe light of speed");
|
||||
expect(wiki.renderTiddler("text/plain","TiddlerThree")).toBe("The speed of soundThe light of speed");
|
||||
});
|
||||
|
||||
it("should render plain text tiddlers as a paragraph", function() {
|
||||
expect(wiki.new_renderTiddler("text/html","TiddlerOne")).toBe("<p>The quick brown fox</p>");
|
||||
expect(wiki.renderTiddler("text/html","TiddlerOne")).toBe("<p>The quick brown fox</p>");
|
||||
});
|
||||
it("should preserve single new lines", function() {
|
||||
expect(wiki.new_renderTiddler("text/html","TiddlerTwo")).toBe("<p>The rain in Spain\nfalls mainly on the plain</p>");
|
||||
expect(wiki.renderTiddler("text/html","TiddlerTwo")).toBe("<p>The rain in Spain\nfalls mainly on the plain</p>");
|
||||
});
|
||||
it("should use double new lines to create paragraphs", function() {
|
||||
expect(wiki.new_renderTiddler("text/html","TiddlerThree")).toBe("<p>The speed of sound</p><p>The light of speed</p>");
|
||||
expect(wiki.renderTiddler("text/html","TiddlerThree")).toBe("<p>The speed of sound</p><p>The light of speed</p>");
|
||||
});
|
||||
it("should support attributes specified as macro invocations", function() {
|
||||
expect(wiki.new_renderTiddler("text/html","TiddlerFour")).toBe("<p><a class=' tw-tiddlylink tw-tiddlylink-missing' href='#This%20is%20my%20amazingly%20groovy%20macro!'>This is a link</a></p>");
|
||||
expect(wiki.renderTiddler("text/html","TiddlerFour")).toBe("<p><a class=' tw-tiddlylink tw-tiddlylink-missing' href='#This%20is%20my%20amazingly%20groovy%20macro!'>This is a link</a></p>");
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user