Fixed handling of quotation marks inside script "one-liners"
This commit is contained in:
parent
409ca78a4f
commit
0caa27023c
1 changed files with 1 additions and 1 deletions
|
|
@ -19,4 +19,4 @@ should generate something like this:
|
|||
<button type="button" onclick="commandMachine('vt100','Keyboard','script','...')">Try It!</button>
|
||||
|
||||
{% endcomment %}
|
||||
{% if page.commands[include.command] != nil %}{% assign machine_command = "script" %}{% capture command_value %}{{ page.commands[include.command] | replace:'"','"' | strip }}{% endcapture %}{% else %}{% capture machine_command %}{{ include.command }}{% endcapture %}{% capture command_value %}{{ include.value }}{% endcapture %}{% endif %}{% if include.type == "button" %}<button type="button" onclick="commandMachine('{{ include.machine }}','{{ include.component }}','{{ machine_command }}','{{ command_value }}')">{{ include.label }}</button>{% else %}<!-- Unrecognized machine control type: {{ include.type }} -->{% endif %}
|
||||
{% if page.commands[include.command] != nil %}{% assign machine_command = "script" %}{% capture command_value %}{{ page.commands[include.command] | replace:'"','"' | strip }}{% endcapture %}{% else %}{% capture machine_command %}{{ include.command }}{% endcapture %}{% capture command_value %}{{ include.value | replace:'"','"' }}{% endcapture %}{% endif %}{% if include.type == "button" %}<button type="button" onclick="commandMachine('{{ include.machine }}','{{ include.component }}','{{ machine_command }}','{{ command_value }}')">{{ include.label }}</button>{% else %}<!-- Unrecognized machine control type: {{ include.type }} -->{% endif %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue