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:
parent
d29f4fa996
commit
9ab9c9cc42
26
core/modules/parsers/newwikitextparser/rules/entity.js
Normal file
26
core/modules/parsers/newwikitextparser/rules/entity.js
Normal 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])];
|
||||
};
|
||||
|
||||
})();
|
@ -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>>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user