1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Added run rule for HTML entities

This commit is contained in:
Jeremy Ruston 2012-06-05 15:00:55 +01:00
parent d29f4fa996
commit 9ab9c9cc42
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,26 @@
/*\
title: $:/core/modules/parsers/newwikitextparser/rules/entity.js
type: application/javascript
module-type: wikitextrule
Wiki text run rule for HTML entities
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name = "entity";
exports.runParser = true;
exports.regExpString = "&#?[a-zA-Z0-9]{2,8};";
exports.parse = function(match,isBlock) {
this.pos = match.index + match[0].length;
return [$tw.Tree.Entity(match[0])];
};
})();

View File

@ -17,7 +17,7 @@ And this will be {{{inline and monospaced}}} and `so will this` little bit.
Here is some ''bold face'', and __some underlining__ and of course some --strikethrough--.
Here's an unterminated ''bit of bold face.
Here's an unterminated ''bit of bold face. And also some entities like Ç Ç "HTML Entity".
Here is a macro <<list all>>