mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
Add new classes to wikitext created emphasised elements to make them easily stylable (#8163)
* allow internal link to be wikitex formatted as bold * fix typo * add new classes to all emphasis and inline-code elements * fix tests for new STRONG classes
This commit is contained in:
parent
40fca47974
commit
44cf2e3c70
@ -48,6 +48,9 @@ exports.parse = function() {
|
||||
tag: "code",
|
||||
children: [{
|
||||
type: "text",
|
||||
attributes: {
|
||||
class: {type: "string", value: "tc-emphasis tc-code"}
|
||||
},
|
||||
text: text,
|
||||
start: start,
|
||||
end: this.parser.pos
|
||||
|
@ -43,6 +43,9 @@ exports.parse = function() {
|
||||
return [{
|
||||
type: "element",
|
||||
tag: "strong",
|
||||
attributes: {
|
||||
class: {type: "string", value: "tc-emphasis tc-strong"}
|
||||
},
|
||||
children: tree
|
||||
}];
|
||||
};
|
||||
|
@ -43,6 +43,10 @@ exports.parse = function() {
|
||||
return [{
|
||||
type: "element",
|
||||
tag: "em",
|
||||
attributes: {
|
||||
class: {type: "string", value: "tc-emphasis tc-italic"}
|
||||
},
|
||||
|
||||
children: tree
|
||||
}];
|
||||
};
|
||||
|
@ -43,6 +43,9 @@ exports.parse = function() {
|
||||
return [{
|
||||
type: "element",
|
||||
tag: "strike",
|
||||
attributes: {
|
||||
class: {type: "string", value: "tc-emphasis tc-strike"}
|
||||
},
|
||||
children: tree
|
||||
}];
|
||||
};
|
||||
|
@ -43,6 +43,9 @@ exports.parse = function() {
|
||||
return [{
|
||||
type: "element",
|
||||
tag: "sub",
|
||||
attributes: {
|
||||
class: {type: "string", value: "tc-emphasis tc-sub"}
|
||||
},
|
||||
children: tree
|
||||
}];
|
||||
};
|
||||
|
@ -43,6 +43,9 @@ exports.parse = function() {
|
||||
return [{
|
||||
type: "element",
|
||||
tag: "sup",
|
||||
attributes: {
|
||||
class: {type: "string", value: "tc-emphasis tc-sup"}
|
||||
},
|
||||
children: tree
|
||||
}];
|
||||
};
|
||||
|
@ -43,6 +43,9 @@ exports.parse = function() {
|
||||
return [{
|
||||
type: "element",
|
||||
tag: "u",
|
||||
attributes: {
|
||||
class: {type: "string", value: "tc-emphasis tc-underscore"}
|
||||
},
|
||||
children: tree
|
||||
}];
|
||||
};
|
||||
|
@ -33,4 +33,4 @@ $param$ with a ''buffalo''
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>Going to lunch with a ''buffalo''</p><p>Going to breakfastwith a<strong>buffalo</strong></p><p>Going to dinner with a <strong>buffalo</strong></p>Going to lunch with a ''buffalo''Going to breakfastwith abuffaloGoing to dinner with a buffalo
|
||||
<p>Going to lunch with a ''buffalo''</p><p>Going to breakfastwith a<strong class="tc-emphasis tc-strong">buffalo</strong></p><p>Going to dinner with a <strong class="tc-emphasis tc-strong">buffalo</strong></p>Going to lunch with a ''buffalo''Going to breakfastwith abuffaloGoing to dinner with a buffalo
|
@ -30,7 +30,7 @@ title: ExpectedResult
|
||||
|
||||
! Not Heading
|
||||
|
||||
Text with <strong>bold</strong><h1 class="">Heading</h1><p>Text with <strong>bold</strong></p><p>! Not Heading
|
||||
Text with <strong class="tc-emphasis tc-strong">bold</strong><h1 class="">Heading</h1><p>Text with <strong class="tc-emphasis tc-strong">bold</strong></p><p>! Not Heading
|
||||
|
||||
Text with <strong>bold</strong><h1 class="">Heading</h1><p>Text with <strong>bold</strong></p>
|
||||
Text with <strong class="tc-emphasis tc-strong">bold</strong><h1 class="">Heading</h1><p>Text with <strong class="tc-emphasis tc-strong">bold</strong></p>
|
||||
</p>
|
@ -30,7 +30,7 @@ title: ExpectedResult
|
||||
|
||||
! Not Heading
|
||||
|
||||
Text with <strong>bold</strong><h1 class="">Heading</h1><p>Text with <strong>bold</strong></p><p>! Not Heading
|
||||
Text with <strong class="tc-emphasis tc-strong">bold</strong><h1 class="">Heading</h1><p>Text with <strong class="tc-emphasis tc-strong">bold</strong></p><p>! Not Heading
|
||||
|
||||
Text with <strong>bold</strong><h1 class="">Heading</h1><p>Text with <strong>bold</strong></p>
|
||||
Text with <strong class="tc-emphasis tc-strong">bold</strong><h1 class="">Heading</h1><p>Text with <strong class="tc-emphasis tc-strong">bold</strong></p>
|
||||
</p>
|
@ -29,10 +29,10 @@ testindex: This is ''wikitext''
|
||||
+
|
||||
title: ExpectedResult
|
||||
|
||||
<p>This is <strong>wikitext</strong>
|
||||
<p>This is <strong class="tc-emphasis tc-strong">wikitext</strong>
|
||||
-
|
||||
<pre><code>This is ''wikitext''</code></pre></p><p>This is <strong>wikitext</strong>
|
||||
<pre><code>This is ''wikitext''</code></pre></p><p>This is <strong class="tc-emphasis tc-strong">wikitext</strong>
|
||||
-
|
||||
<pre><code>This is ''wikitext''</code></pre></p><p>This is <strong>wikitext</strong>
|
||||
<pre><code>This is ''wikitext''</code></pre></p><p>This is <strong class="tc-emphasis tc-strong">wikitext</strong>
|
||||
-
|
||||
<pre><code>This is ''wikitext''</code></pre></p>
|
@ -493,6 +493,11 @@ a.tc-tiddlylink-external:hover {
|
||||
color: <<colour tiddler-link-background>>;
|
||||
}
|
||||
|
||||
/* wikitext bold for ''[[internal link]]'' */
|
||||
strong.tc-strong .tc-tiddlylink {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/*
|
||||
** Drag and drop styles
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user