mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-10-31 07:06:19 +00:00
8e9d8d4fef
* Added failing test for #7604 * Fix attribute substitution regexp Use the same regexp in wiki.getSubstitutedText as is used in Widget.prototype.substituteVariableReferences. Fixes #7604. * Added a test for a variable name containing spaces
21 lines
755 B
Plaintext
21 lines
755 B
Plaintext
title: Widgets/SubstitutedAttributes
|
|
description: Attributes specified as string that should have substitution performed.
|
|
type: text/vnd.tiddlywiki-multiple
|
|
tags: [[$:/tags/wiki-test-spec]]
|
|
|
|
title: Output
|
|
|
|
\whitespace trim
|
|
<$set name="var with spaces" value="spaces">
|
|
<$let project="TiddlyWiki" disabled="true" var-with-dashes="dashes">
|
|
<div class=`$(project)$
|
|
${ [[Hello]addsuffix[There]] }$` attrib=`myvalue` otherattrib=`$(1)$` blankattrib=`` quoted="here" disabled=```$(disabled)$``` dashes=`$(var-with-dashes)$` spaces=`$(var with spaces)$`>
|
|
</div>
|
|
</$let>
|
|
</$set>
|
|
|
|
+
|
|
title: ExpectedResult
|
|
|
|
<p><div attrib="myvalue" blankattrib="" class="TiddlyWiki
|
|
HelloThere" dashes="dashes" disabled="true" otherattrib="" quoted="here" spaces="spaces"></div></p> |