How-to: Difference between revisions

From B-Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 3: Line 3:


== Shortcuts ==
== Shortcuts ==
<syntaxhighlight>
{| class="wikitable"
|-
! <syntaxhighlight>
{{Shortcut|botland.png|botland.com.pl|Botland store}}
{{Shortcut|botland.png|botland.com.pl|Botland store}}
</syntaxhighlight>
</syntaxhighlight>
!
{{Shortcut|botland.png|botland.com.pl|Botland store}}
|}


= Syntax highligher =
= Syntax highligher =

Revision as of 12:48, 1 December 2021

Templates

Shortcuts

<syntaxhighlight>
  • Botland store
  • </syntaxhighlight>

  • Botland store
  • Syntax highligher

    Current syntax highligher integration: Syntax highligher

    Highligher: highlight.js

    Sample code

    <syntaxhighlight> # The Greeter class class Greeter def initialize(name) @name = name.capitalize end def salute puts "Hello #{@name}!" end end g = Greeter.new("world") g.salute </syntaxhighlight>

    will result to

    <syntaxhighlight>

    1. The Greeter class

    class Greeter

     def initialize(name)
       @name = name.capitalize
     end
    
     def salute
       puts "Hello #{@name}!"
     end
    

    end

    g = Greeter.new("world") g.salute </syntaxhighlight>