Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Template:Code/doc"

From Roll20 Wiki

Jump to: navigation, search
(Created page with "{{documentation subpage|override=code/doc|Code}} Shorthand to more easily write code on the wiki. '''Example:''' {{code|/r d20+4}} <pre> {{code|/r d20+4}} </pre> <includ...")
 
m (update examples)
Line 3: Line 3:
 
Shorthand to more easily write code on the wiki.
 
Shorthand to more easily write code on the wiki.
  
'''Example:'''
 
  
{{code|/r d20+4}}
+
'''Example 1.'''
 +
 
 +
any words before {{code|/r 1d6+4}}, or words, {{code|/roll 1d6+4}}
 +
 
 +
<pre>any words before {{code|/r 1d6+4}}, or words, {{code|/roll 1d6+4}}</pre>
 +
 
 +
'''Example 2.'''
 +
 
 +
You can even write code that include problematic elements that the wiki could mistake for wiki syntax, such as {{code|{{roll=[[1d6+4]]}} }} without the need of using nowiki element the code block. However, wiki links would still show up so nowiki is needed if inline rolls are present: {{code|<nowiki>Inline roll [[1d6+4]] would usually turn into a wiki link</nowiki> }}
  
 
<pre>
 
<pre>
{{code|/r d20+4}}  
+
You can even write code that include problematic elements that the wiki could mistake for wiki syntax, such as {{code|{{roll=[[1d6+4]]}} }} without the need of using nowiki element the code block. However, wiki links would still show up so nowiki is needed if inline rolls are present: {{code|<nowiki>Inline roll [[1d6+4]] would usually turn into a wiki link</nowiki> }}</pre>
</pre>
+
 
  
 
<includeonly>[[Category:Regular Grammar Templates]]</includeonly>
 
<includeonly>[[Category:Regular Grammar Templates]]</includeonly>

Revision as of 20:34, 13 November 2020

Shorthand to more easily write code on the wiki.


Example 1.

any words before /r 1d6+4, or words, /roll 1d6+4

any words before {{code|/r 1d6+4}}, or words, {{code|/roll 1d6+4}}

Example 2.

You can even write code that include problematic elements that the wiki could mistake for wiki syntax, such as {{roll=1d6+4}} without the need of using nowiki element the code block. However, wiki links would still show up so nowiki is needed if inline rolls are present: Inline roll [[1d6+4]] would usually turn into a wiki link

You can even write code that include problematic elements that the wiki could mistake for wiki syntax, such as {{code|{{roll=[[1d6+4]]}} }} without the need of using nowiki element the code block. However, wiki links would still show up so nowiki is needed if inline rolls are present: {{code|Inline roll [[1d6+4]] would usually turn into a wiki link }}