mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Fixed problem with custom CSS classes
This commit is contained in:
parent
a09c43d456
commit
be52fbb5d1
@ -636,7 +636,7 @@ WikiTextRules.rules = [
|
||||
w.output.push(e);
|
||||
var styles = WikiTextRules.inlineCssHelper(w);
|
||||
if(styles.length === 0)
|
||||
e.className = "marked";
|
||||
WikiTextRules.setAttr(e,"className","marked");
|
||||
else
|
||||
WikiTextRules.applyCssHelper(e,styles);
|
||||
w.subWikifyTerm(e.children,/(@@)/mg);
|
||||
@ -647,9 +647,8 @@ WikiTextRules.rules = [
|
||||
var lookaheadMatch = lookaheadRegExp.exec(w.source);
|
||||
if(lookaheadMatch) {
|
||||
w.nextMatch = lookaheadRegExp.lastIndex;
|
||||
e = {type: lookaheadMatch[2] == "\n" ? "div" : "span", children: [
|
||||
{type: "text", value: lookaheadMatch[1]}
|
||||
]};
|
||||
e = {type: lookaheadMatch[2] == "\n" ? "div" : "span", children: []};
|
||||
WikiTextRules.setAttr(e,"className",lookaheadMatch[1]);
|
||||
w.output.push(e);
|
||||
w.subWikifyTerm(e.children,/(\}\}\})/mg);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
<h2>Heading</h2>This is the second tiddler. It has a list:<br /><ul><li> Item one</li><li> Item two</li><li> Item three</li></ul>And a <macro></macro><br />
|
||||
<h2>Heading</h2>This is the second tiddler. It has a list:<br /><ul><li> Item one</li><li> Item two</li><li> Item three</li></ul>And a <macro></macro> and a <span className="myClass">custom class</span><br />
|
@ -5,4 +5,4 @@ This is the second tiddler. It has a list:
|
||||
* Item one
|
||||
* Item two
|
||||
* Item three
|
||||
And a <<macro invocation>>
|
||||
And a <<macro invocation>> and a {{myClass{custom class}}}
|
||||
|
@ -1 +1 @@
|
||||
HeadingThis is the second tiddler. It has a list: Item one Item two Item threeAnd a
|
||||
HeadingThis is the second tiddler. It has a list: Item one Item two Item threeAnd a and a custom class
|
Loading…
Reference in New Issue
Block a user