### Pharo Finder Search Examples Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html Demonstrates how to use the Pharo Finder to locate methods by providing example inputs and expected outputs. The Finder suggests methods that match the given examples and lists classes implementing them. ```APIDOC Finder Search Syntax: 'eureka' . 'EUREKA' - Searches for methods that transform 'eureka' into 'EUREKA'. 25 . 35 . 5 - Searches for methods that find the greatest common factor of two integers (e.g., 25 and 35, expecting 5). Usage: - Type example expressions into the Finder search box. - Press Enter to see suggested methods and implementing classes. - An asterisk (*) indicates the method actually executed for the result. ``` -------------------------------- ### Download Pharo 40 System with VM Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html This shell command downloads the latest Pharo 40 full system, including the virtual machine, using wget. The output is piped directly to bash for execution, automating the download and setup process. ```shell wget -O- get.pharo.org/40+vm | bash ``` -------------------------------- ### Pharo Method Definition Example: 'shout' Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html Shows the conceptual example of a new method 'shout' in the String class, which is intended to convert a string to its uppercase version with emphasis. ```Pharo String >> shout "Says something loudly and with emphasis." ^ self uppercase , '!' Example: 'No panic' shout --> 'NO PANIC!' ``` -------------------------------- ### Node.js Installation and API Docs Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Information on how to install highlight.js using npm for Node.js environments and where to find API documentation. ```bash npm install highlight.js ``` ```APIDOC highlight.js API Documentation: Available on the project wiki. Link: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api ``` -------------------------------- ### Git Branching Workflow Example Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/README.md Illustrates the recommended Git branching strategy for contributions, including naming conventions and the fork-and-pull workflow. ```Git git checkout -b dz_PharoTour_update_screen_snapshots ``` -------------------------------- ### Pillar Code Block Syntax Example Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/README.md Provides an example of Pillar markup for embedding code blocks, including language specification, captions, and labels for referencing. ```Pillar [[[language=smalltalk|caption=Hello World in a Transcript|label=src:helloWorld Transcript show: 'hello world'; cr. ]]] ``` -------------------------------- ### Pillar Image Syntax Example Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/README.md Demonstrates the Pillar markup syntax for embedding images, specifying captions, file paths, dimensions, and labels for cross-referencing. ```Pillar +A stream positioned at its beginning.>file://figures/abcde.png|width=100|label=fig:abcde+ ``` -------------------------------- ### Custom Initialization with jQuery Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/README.md Provides an example of custom initialization using jQuery. It iterates over all `
` blocks and applies `hljs.highlightBlock` to each, offering more control than `initHighlightingOnLoad`.

```javascript
$(document).ready(function() {
  $('pre code').each(function(i, block) {
    hljs.highlightBlock(block);
  });
});
```

--------------------------------

### Basic SBAbook LaTeX Document Setup

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/latex/sbabook/README.markdown

Demonstrates the minimal preamble required to start a document using the SBAbook LaTeX class. It includes setting the main language using polyglossia, which is noted as an alternative to babel.

```latex
\documentclass{sbabook}
\setmainlanguage{english} % this is polyglossia, not babel
\begin{document}

...and off you go!

\end{document}
```

--------------------------------

### Execute Pharo Tutorial

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

This snippet demonstrates sending a message to execute the Pharo tutorial. It involves opening the Playground tool and entering the expression 'ProfStef go.', then selecting 'Do it' from the context menu.

```Pharo
ProfStef go.
```

--------------------------------

### Pillar Chapter Reference Link Example

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/README.md

Illustrates the Pillar syntax for creating internal links to other chapters within the book, using chapter names and unique identifiers.

```Pillar
Chapter *: A Quick Tour of Pharo>../PharoTour/PharoTour.pillar@cha:tour*
```

--------------------------------

### Almond.js Optimization Example

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/README.md

Illustrates how to use the `r.js` optimizer with Almond.js to bundle Highlight.js, specifying a module name and path for optimization.

```shell
r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
```

--------------------------------

### Basic Highlight.js Initialization

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/README.md

Demonstrates the minimal setup for using Highlight.js on a web page. It involves linking the library, a stylesheet, and calling `initHighlightingOnLoad` to automatically detect and highlight code within `
` tags.

```html



```

--------------------------------

### Pillar Image Reference Example

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/README.md

Shows how to reference an image previously defined using Pillar syntax, rendering it as a figure with a sequential number.

```Pillar
Figure *@fig:abcde*
```

--------------------------------

### Pillar Code Block Reference Example

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/README.md

Demonstrates how to reference a code block defined using Pillar syntax, rendering it as a script with a sequential identifier.

```Pillar
Script *@scr:helloWorld*
```

--------------------------------

### Pharo Launching Command Line Pattern

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

This is the general pattern for launching a Pharo environment from a terminal. It requires specifying the Pharo executable and the path to the Pharo image file.

```APIDOC
 
```

--------------------------------

### Launch Pharo on Linux

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Command to launch Pharo from the Linux command line. Assumes you are in the unzipped Pharo folder and specifies the image path.

```Bash
./pharo shared/Pharo4.0.image
```

--------------------------------

### Pharo Playground: Displaying Text in Transcript

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Demonstrates how to use the Pharo Playground to send a message to the Transcript object, displaying a string and a newline character. This is a fundamental example of interactive code execution in Pharo.

```Smalltalk
Transcript show: 'hello world'; cr.
```

--------------------------------

### Pillar Inline Code Syntax Example

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/README.md

Shows the Pillar markup for formatting inline code elements such as objects, messages, variables, or packages, using monospace notation.

```Pillar
`==Object==`
```

--------------------------------

### Pharo Class Browsing Methods

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Demonstrates common ways to find and browse classes in Pharo Smalltalk. This includes using the 'browse' message, keyboard shortcuts, and the Spotter tool for efficient navigation.

```Smalltalk
Point browse
"Opens a browser on the Point class."
```

```Smalltalk
"In any text pane, select a class name (e.g., 'Point') and press CMD-b to browse."
```

```Smalltalk
"Press Shift+Enter to open Spotter. Type '#class Point' to find the Point class."
```

```Smalltalk
"In Spotter, type '#implementor: printString' to find implementors of the printString message."
```

```Smalltalk
"In Spotter, type '#sender: printString' to find senders of the printString message."
```

```Smalltalk
"In Spotter, type '#reference: Point' to find all references to the Point class."
```

```Smalltalk
"In Spotter, type '#playground' to find playground code snippets."
```

--------------------------------

### Launch Pharo on macOS

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Command to launch Pharo from the macOS command line. This requires navigating into the application bundle's executable and specifying the image path.

```Bash
Pharo4.0.app/Contents/MacOS/Pharo Pharo4.0.app/Contents/Resources/Pharo4.0.image
```

--------------------------------

### Pharo Playground: Basic Arithmetic and 'Print it'

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Illustrates basic arithmetic operations within a Pharo Playground and explains the difference between 'Do it' and 'Print it'. 'Print it' compiles, executes, and displays the result of an expression, often indicated by '-->'.

```Smalltalk
3 + 4 --> 7
```

--------------------------------

### Launch Pharo on Windows

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Command to launch the Pharo IDE from the Windows command line. This assumes the Pharo executable and image file are located in the current directory or accessible via the system's PATH.

```command-line
Pharo.exe Pharo4.0.image
```

--------------------------------

### Spotter Method Search Patterns

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Spotter allows searching for methods using specific patterns. '#implementor' finds all methods with a given name, while '#selector' finds all selectors matching the name. These are powerful ways to discover method implementations.

```Smalltalk
#implementor a method name
#selector a method name
```

--------------------------------

### Open System Browser on a Method

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Opens the Pharo System Browser (Nautilus) to a specific method within a class. This is useful for directly navigating to and examining the source code of a particular method.

```Smalltalk
Nautilus openOnMethod: Integer>>#factorial
```

--------------------------------

### NSIS Update

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md

Updates the NSIS (Nullsoft Scriptable Install System) definition. This ensures better recognition and highlighting of NSIS installer scripts.

```NSIS
!define PRODUCT_NAME "My Application"

Name "${PRODUCT_NAME}"
```

--------------------------------

### Pharo Debugger: Creating a New Method

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Describes the process of creating a new method directly within the Pharo debugger when a test fails due to an unimplemented method. This includes selecting the class, protocol, and editing the method body.

```APIDOC
Pharo Debugger - Method Creation:

When a MessageNotUnderstood error occurs during test execution, the Pharo debugger provides tools to create the missing method.

Process:
1.  **Error Identification**: The debugger highlights the message that was not understood (e.g., `ByteString>>shout`).
2.  **Create Button**: Click the 'Create' button in the debugger window.
3.  **Class Selection**: A prompt appears to select the class where the method should be defined (e.g., `StringTest` or `ByteString`).
4.  **Protocol Selection**: Choose a protocol (category) for the new method.
5.  **Method Editor**: A code editor opens within the debugger, pre-filled with a placeholder for the method.
6.  **Method Implementation**: Write the actual code for the method (e.g., `shout ^ self asUppercase,'!'`).
7.  **Compilation**: Compile the method using `CMD-s` (or equivalent).
8.  **Proceed**: Click 'Proceed' to resume test execution with the newly implemented method.
```

--------------------------------

### Pharo Test Method for 'shout'

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html

Illustrates defining a test method in Pharo using Test-Driven Development (TDD). This test method verifies that a new 'shout' method correctly transforms a string to uppercase with emphasis.

```Pharo
StringTest class >> testShout

  "Test the shout method"
  self assert: ('No panic' shout = 'NO PANIC!')
```

--------------------------------

### Highlight.js Language Submode Refactoring Example

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md

Demonstrates a refactoring technique in highlight.js for defining language submodes directly within the 'contains' array, simplifying parsing logic for auxiliary modes.

```javascript
contains: [
  'string',
  'number',
  {
    begin: '\n',
    end: hljs.IMMEDIATE_RE
  }
]
```

--------------------------------

### Fix highlighting for numbers with leading decimal point

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md

Corrects the highlighting for numeric literals that start with a decimal point (e.g., `.5`). This ensures these numbers are recognized as valid numeric types.

```APIDOC
Number literal with leading decimal:
  .5
  .12345
```

--------------------------------

### Highlight.js API Documentation

Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md

Comprehensive API documentation for Highlight.js, covering configuration methods, language registration, and highlighting functions. This section details how to manage library settings and integrate highlighting into applications.

```APIDOC
Highlight.js API Reference:

Global Configuration:
  configure(options)
    - Sets global configuration options for Highlight.js.
    - Parameters:
      - options (object): An object containing configuration settings.
        - classPrefix (string, optional): Prefix for CSS classes. Defaults to 'hljs-'. Set to '' to disable.
        - tabReplace (string, optional): String to replace tabs with. Defaults to null.
        - useBR (boolean, optional): Whether to use 
tags for line breaks. Defaults to false. - Example: hljs.configure({ classPrefix: 'my-prefix-', tabReplace: ' ' }); Language Registration: registerLanguage(name, language) - Registers a new language definition with the library. - Parameters: - name (string): The name of the language (e.g., 'javascript'). - language (object): The language definition object. - Returns: boolean - True if registration was successful, false otherwise. getLanguage(name) - Retrieves a registered language definition. - Parameters: - name (string): The name of the language to retrieve. - Returns: object | null - The language definition object or null if not found. Highlighting Functions: highlight(name, value, ignore_illegals) - Highlights a block of code. - Parameters: - name (string): The language name to highlight with. - value (string): The code string to highlight. - ignore_illegals (boolean, optional): Whether to ignore illegal syntax. Defaults to false. - Returns: HighlightResult - An object containing the highlighted code and relevance score. highlightAuto(value, languageSubset) - Automatically detects and highlights a block of code. - Parameters: - value (string): The code string to highlight. - languageSubset (Array, optional): An array of language names to restrict detection to. - Returns: HighlightResult - An object containing the highlighted code and relevance score. highlightBlock(block, ignore_illegals, continuation) - Highlights a DOM element containing code. - Parameters: - block (HTMLElement): The DOM element to highlight. - ignore_illegals (boolean, optional): Whether to ignore illegal syntax. Defaults to false. - continuation (boolean, optional): For incremental highlighting. Defaults to false. Result Object (HighlightResult): value (string): The highlighted code. language (string): The detected language. relevance (number): The relevance score of the detected language. second_best (object): Information about the second-best language detection (if any). Breaking Changes in v8.0: - Class prefixing: All classes are now prefixed with `hljs-` by default. - `tabReplace` and `useBR` are unified into global `configure` options. - Removed undocumented `hljs.LANGUAGES` object in favor of `registerLanguage` and `getLanguage`. - Relevance score attributes `relevance` and `keyword_count` are unified into `relevance`. ``` -------------------------------- ### New Style Themes Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Details new style themes introduced for code highlighting. ```APIDOC New Style Themes: - Pojoaque: Dark theme by Jason Tate. - XCode emulation: Style emulating the XCode IDE. ``` -------------------------------- ### Implement shout Method in Pharo Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/PharoTour/test.html Defines the `shout` method for String objects in Pharo. This method converts the string to uppercase and appends an exclamation mark. It is designed to make a previously failing test pass. ```Pharo shout ^ self asUppercase,'!' ``` -------------------------------- ### New Languages Added (v9.5.0) Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Added support for Excel, Linden Scripting Language, TAP (Test Anything Protocol), Pony, Coq, dsconfig, and LDIF. ```APIDOC New Languages: - Excel - Linden Scripting Language - TAP - Pony - Coq - dsconfig - LDIF ``` -------------------------------- ### Highlight.js Initialization Function Change Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md A backwards-incompatible change was introduced in version 3.0 regarding the initialization function. The older `initHighlighting` function, which was a precursor to `initHighlightingOnLoad`, is no longer supported and must be replaced with the current initialization methods. ```javascript // Old, deprecated initialization (pre-3.0) // initHighlighting(); // New recommended initialization (3.0+) // import hljs from 'highlight.js'; // hljs.highlightAll(); ``` -------------------------------- ### Add Access logs Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for common access log formats. This helps in parsing and analyzing web server logs. ```Access logs 127.0.0.1 - - [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 ``` -------------------------------- ### C# Generics and Keywords Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md C# highlighting has been updated with new keywords and fixes to allow multiple identifiers within generics `<...>`, improving support for modern C# syntax. ```C# public class MyClass { public T1 Value1 { get; set; } public T2 Value2 { get; set; } } // Example usage var instance = new MyClass(); ``` -------------------------------- ### Add LiveCode Server Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Integrates support for LiveCode Server, a platform for building web applications. The contribution comes from Ralf Bitter. ```APIDOC Language: LiveCode Server Description: Adds LiveCode Server syntax highlighting. Contributors: Ralf Bitter Documentation: http://livecode.com/developers/guides/server/ ``` -------------------------------- ### Implement AMD Build Format Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Adds support for building the project in the Asynchronous Module Definition (AMD) format, improving modularity and compatibility. ```APIDOC Build Format: AMD Action: Implemented. Description: Supports Asynchronous Module Definition for modularity. ``` -------------------------------- ### Lisp Highlighting (Experimental) Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces experimental Lisp highlighting that attempts to highlight the first word in parentheses where it makes sense, rather than relying on pre-defined keyword sets. Feedback from Lisp programmers is requested. ```Lisp ;; Experimental Lisp highlighting ;; Highlights the first word in parentheses where applicable. ;; May require user feedback for accuracy. ``` -------------------------------- ### New Languages Added (v9.4.0) Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduced highlighting support for PureBASIC, BNF, and Ada, expanding the project's language coverage. ```APIDOC New Languages: - PureBASIC - BNF - Ada ``` -------------------------------- ### Add DNS zone file Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for DNS zone file formats. This allows for accurate parsing and display of DNS records. ```DNS zone file @ IN SOA ns1.example.com. admin.example.com. ( 1000000 ; serial 604800 ; refresh 86400 ; retry 2419200 ; expire 86400 ) ; minimum @ IN NS ns1.example.com. @ IN A 192.0.2.1 ``` -------------------------------- ### Add XQuery Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for the XQuery language. This allows for proper recognition and display of XQuery code. ```XQuery XQuery ``` -------------------------------- ### Add TP Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for the TP (Test Plan) language. This enables proper recognition and display of TP code. ```TP TP ``` -------------------------------- ### Verilog Compliance Update Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Updated Verilog highlighting to comply with IEEE 1800-2012 SystemVerilog standards, ensuring accurate parsing of modern hardware description language features. ```SystemVerilog module my_module ( input wire clk, input wire reset, output logic signed [7:0] data_out ); always_ff @(posedge clk or posedge reset) begin if (reset) data_out <= '0; else data_out <= data_out + 1; end endmodule ``` -------------------------------- ### Language Improvements Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Summarizes improvements made to various programming languages' syntax highlighting within highlight.js. ```APIDOC Language Improvements: - Python: Interpreter prompt (`>>>` and `...`) highlighting. - CoffeeScript: `@`-properties and classes support. - JavaScript: E4X support. - Perl: New keywords support. - Ruby: Significant syntax update and refactoring. - Bash: Small fixes. - Haskell: Reworked for richness and correctness. - VHDL: Reworked for richness and correctness. - Nginx: Remade in a more generic manner for smaller, universal syntax. ``` -------------------------------- ### N1QL Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces support for N1QL (SQL for JSON). This update provides syntax highlighting for N1QL queries. ```N1QL -- Example of N1QL query SELECT * FROM my_bucket WHERE type = 'user'; ``` -------------------------------- ### Add Golo Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for the Golo programming language. This enables proper recognition of Golo code structures. ```Golo Golo ``` -------------------------------- ### Add Mizar Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Integrates support for Mizar, a formal proof language. Kelley van Evert contributed this feature. ```APIDOC Language: Mizar Description: Adds Mizar syntax highlighting. Contributors: Kelley van Evert ``` -------------------------------- ### New Styles Added (v9.4.0) Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Added the 'PureBASIC' style, providing a new visual theme for code highlighting. ```APIDOC New Styles: - PureBASIC ``` -------------------------------- ### Go Function Declarations Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Added highlighting for function declarations in Go, improving the readability of Go source code. ```Go package main import "fmt" func main() { fmt.Println("Hello, Go!") } ``` -------------------------------- ### Add OpenSCAD Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for OpenSCAD, a script-based 3D CAD modeller. This allows for accurate parsing and display of OpenSCAD scripts. ```OpenSCAD difference() { cube(10); sphere(5); } ``` -------------------------------- ### Add SQF Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces support for the SQF (Scripting for Game Servers) programming language. This enables proper syntax highlighting for SQF scripts. ```SQF SQF ``` -------------------------------- ### MikroTik RouterOS Scripting Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Adds support for MikroTik RouterOS Scripting language. This update introduces syntax highlighting and parsing capabilities for scripts written in this language. ```MikroTik RouterOS Scripting # Example of MikroTik RouterOS Scripting (syntax highlighting added) # /ip firewall nat add chain=dstnat protocol=tcp dst-port=80 to-addresses=192.168.88.10 ``` -------------------------------- ### Add Inform7 Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for Inform 7, a natural language programming language for interactive fiction. This enables proper recognition and display of Inform 7 code. ```Inform7 Inform7 ``` -------------------------------- ### Add AsciiDoc and Haml Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for AsciiDoc, a text document format, and Haml, a templating engine. Dan Allen is credited for both. ```APIDOC Language: AsciiDoc Description: Adds AsciiDoc syntax highlighting. Contributors: Dan Allen ``` ```APIDOC Language: Haml Description: Adds Haml syntax highlighting. Contributors: Dan Allen ``` -------------------------------- ### Add Toml (ini extension) Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for TOML (Tom's Obvious, Minimal Language) files, extending INI file support. This allows for accurate parsing of configuration files. ```Toml [owner] name = "Tom Preston-Werner" email = "tom@example.com" ``` -------------------------------- ### New Languages Added (v9.3.0) Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduced highlighting support for Tagger Script and MoonScript, expanding the project's language coverage. ```APIDOC New Languages: - Tagger Script - MoonScript ``` -------------------------------- ### Add label support to Dockerfile Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Improves Dockerfile syntax highlighting by adding support for the 'label' instruction. This ensures that labels used for metadata in Dockerfiles are correctly recognized. ```Dockerfile LABEL "com.example.version" "1.0" ``` -------------------------------- ### HTTP and JSON Highlighting Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Details the unique feature of highlighting HTTP headers and arbitrary language content within request bodies, specifically mentioning support for XML and JSON. ```APIDOC HTTP/JSON Highlighting: - Highlights HTTP headers. - Highlights arbitrary language in request body. - Supported languages for request body: XML, JSON. - Related post: http://softwaremaniacs.org/blog/2012/05/10/http-and-json-in-highlight-js/en/ ``` -------------------------------- ### Add armasm Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for armasm, the ARM assembler. This allows for accurate parsing and display of ARM assembly code. ```armasm armasm ``` -------------------------------- ### Add Makefile Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Provides basic support for Makefile syntax, commonly used in build automation. Ivan Sagalaev contributed this feature. ```APIDOC Language: Makefile Description: Adds basic Makefile syntax highlighting. Contributors: Ivan Sagalaev ``` -------------------------------- ### Add Mojolicious Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for the Mojolicious framework's syntax. This enables proper recognition and display of Mojolicious code. ```Mojolicious Mojolicious ``` -------------------------------- ### C/C++ functions support pointer, reference, and move returns Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Enhances C/C++ syntax highlighting to correctly recognize function return types involving pointers (`*`), references (`&`), and C++11 move semantics (`&&`). This improves the accuracy of C++ code parsing. ```C/C++ int* get_pointer(); std::string& get_reference(); std::vector&& get_rvalue_ref(); ``` -------------------------------- ### Add Zephir Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for the Zephir programming language. This allows for proper recognition and display of Zephir code. ```Zephir Zephir ``` -------------------------------- ### SQL Keyword Grouping Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md The engine now supports grouping keywords into categories like 'keyword', 'built-in function', and 'literal', enabling more precise syntax highlighting for SQL. ```SQL -- SQL example demonstrating keywords and functions SELECT COUNT(user_id) AS total_users FROM users WHERE status = 'active'; -- Example of a built-in function: COUNT -- Example of a keyword: SELECT, FROM, WHERE ``` -------------------------------- ### Including Additional Languages from CDN Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/README.md Shows how to include specific language definitions from a CDN when the default hosted package doesn't include the required language. This is useful for languages not present in the "Common" section of the CDN. ```html ``` -------------------------------- ### Delphi Free Pascal Keywords Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Delphi highlighting has been updated to include new Free Pascal keywords, enhancing support for modern Delphi development. ```Delphi VAR i: Integer; BEGIN // New keyword usage example FOR i := 1 TO 10 DO Writeln(i); END. ``` -------------------------------- ### New Styles Added (v9.3.0) Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Added the 'xt256' style, providing a new visual theme for code highlighting. ```APIDOC New Styles: - xt256 ``` -------------------------------- ### Add Scilab Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Includes support for Scilab, a high-level, numerically oriented programming language. Sylvestre Ledru is credited for this implementation. ```APIDOC Language: Scilab Description: Adds Scilab syntax highlighting. Contributors: Sylvestre Ledru ``` -------------------------------- ### JavaScript Style Switcher Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Vladimir Epifanov implemented a JavaScript-based style switcher for test.html, allowing users to dynamically change the syntax highlighting theme. ```JavaScript // JavaScript style switcher implementation // Allows dynamic theme changes in test.html // Example: switchStyle('zenburn'); ``` -------------------------------- ### New Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Lists newly added languages to the highlight.js library. ```APIDOC New Languages Added: - AppleScript - Brainfuck - Clojure - D - R - GLSL ``` -------------------------------- ### PowerShell Comments and Strings Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Improved rules for comments and strings in PowerShell files, leading to more accurate highlighting. ```PowerShell # This is a comment $message = "Hello, World!" ``` -------------------------------- ### VHDL Update Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Updates to VHDL highlighting include support for PSL keywords and more consistent styling. This improves the accuracy and readability of VHDL code. ```VHDL UPDATE VHDL highlighting with PSL keywords and consistent styling. ``` -------------------------------- ### PowerShell New Commands Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Adds new commands for PowerShell. This update enhances the PowerShell language definition with support for recently introduced cmdlets and syntax. ```PowerShell # Example of PowerShell syntax (new commands) Get-Process | Where-Object {$_.CPU -gt 100} ``` -------------------------------- ### Kotlin Annotations and Keywords Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Kotlin's definition has been updated with new annotations, updated keywords, and other minor improvements for better highlighting. ```Kotlin annotation class MyAnnotation @MyAnnotation fun myFunction() { println("Hello, Kotlin!") } ``` -------------------------------- ### Unified documentation comment modes Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Unifies the highlighting modes for various documentation comment formats, including phpDoc, Javadoc, and YARDoc, across all supported languages. This ensures consistent and accurate rendering of code documentation blocks. ```APIDOC /** * Javadoc style comment * @param {string} name - The name parameter * @returns {number} The result */ /** * phpDoc style comment * @param string $name The name parameter * @return int The result */ # YARDoc style comment # @param String name The name parameter # @return Integer The result ``` -------------------------------- ### Add Docco Style Theme Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces a new color scheme inspired by the Docco documentation generator. Simon Madine contributed this theme. ```APIDOC Style: Docco Description: A color scheme inspired by Docco. Contributors: Simon Madine ``` -------------------------------- ### Add AutoIt Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for the AutoIt scripting language. This allows for proper recognition and display of AutoIt scripts. ```AutoIt AutoIt ``` -------------------------------- ### XML Highlighting Features Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Custom XML highlighting is improved to detect and apply specific rules, including support for CDATA sections and processing instructions (``). ```XML ]> Hello, World! ``` -------------------------------- ### Rust Keyword Update Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Added the `move` keyword to Rust, improving the highlighting of Rust's ownership and borrowing system. ```Rust fn main() { let s1 = String::from("hello"); let s2 = s1; // s1 is moved here // println!("{}", s1); // This would cause a compile error println!("{}", s2); } ``` -------------------------------- ### Highlight.js Modularization and Dynamic Loading Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Version 3.0 introduced modularization to highlight.js, allowing it to dynamically load only the necessary language modules for highlighting. This significantly reduces the library's footprint in the browser when only a subset of languages is needed. ```javascript import hljs from 'highlight.js'; // Dynamically load specific languages hljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript')); hljs.registerLanguage('python', require('highlight.js/lib/languages/python')); // Initialize highlighting with loaded languages hljs.highlightAll(); ``` -------------------------------- ### Web Worker Highlighting - Worker Script Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/README.md This is the worker script (`worker.js`) responsible for performing the highlighting. It imports the Highlight.js library, receives code content via `onmessage`, highlights it using `highlightAuto`, and posts the result back to the main thread. ```javascript onmessage = function(event) { importScripts('/highlight.pack.js'); var result = self.hljs.highlightAuto(event.data); postMessage(result.value); } ``` -------------------------------- ### Clean Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Adds support for the Clean programming language. This update provides syntax highlighting for Clean code. ```Clean // Example of Clean syntax Start = length "Hello" ``` -------------------------------- ### Add abstract and namespace to TypeScript Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Enhances TypeScript support by adding the 'abstract' and 'namespace' keywords. This improves the accuracy of syntax highlighting and code analysis for modern TypeScript features. ```TypeScript abstract namespace ``` -------------------------------- ### Configure Highlight.js Class Prefix Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Demonstrates how to initialize Highlight.js with a custom configuration to disable the default `hljs-` prefix for CSS classes. This is useful for avoiding conflicts with existing stylesheets. ```html ``` -------------------------------- ### Leaf Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Adds support for the Leaf programming language. This includes syntax highlighting for Leaf code. ```Leaf # Example of Leaf syntax let x = 10; print x; ``` -------------------------------- ### Add async and await keywords to Python Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Integrates the 'async' and 'await' keywords into Python syntax highlighting. This supports the asynchronous programming features introduced in recent Python versions. ```Python async def my_async_function(): await some_other_async_function() ``` -------------------------------- ### New Languages Added (v9.6.0) Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduced highlighting support for ABNF, EBNF, Awk, and SubUnit languages, expanding the project's language coverage. ```APIDOC New Languages: - ABNF - EBNF - Awk - SubUnit ``` -------------------------------- ### Add Foundation Style Theme Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces a new color scheme named Foundation. Dan Allen contributed this theme. ```APIDOC Style: Foundation Description: A color scheme named Foundation. Contributors: Dan Allen ``` -------------------------------- ### TypeScript Annotations and Constructor Params Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Updates TypeScript highlighting to include annotations and parameter lists within constructors. This improves the accuracy of TypeScript class syntax parsing. ```TypeScript class MyComponent { constructor(@Inject('config') private config: Config) {} } ``` -------------------------------- ### Scheme `-quoted` Lists Handling Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Improves Scheme language support by correctly handling `-quoted` lists. This ensures accurate parsing and highlighting of Scheme code with quasiquotation. ```Scheme ;; Example of Scheme syntax with quasiquotation (define (make-list item count) `(,item ,@ (repeat (- count 1) item))) ``` -------------------------------- ### Add C/AL Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for the C/AL (Component Application Language) used in Microsoft Dynamics NAV. This enables proper recognition of C/AL code. ```C/AL C/AL ``` -------------------------------- ### LLVM Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Adds support for the LLVM Intermediate Representation (IR) language. This update provides syntax highlighting for LLVM IR code. ```LLVM ; Example of LLVM IR syntax def @my_function(%0: i32): i32 { ret i32 %0 } ``` -------------------------------- ### Web Worker Highlighting - Main Script Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/README.md This snippet shows the main script's logic for using a Web Worker to perform syntax highlighting. It sends the code content to the worker and updates the DOM with the highlighted result received via `onmessage`. ```javascript addEventListener('load', function() { var code = document.querySelector('#code'); var worker = new Worker('worker.js'); worker.onmessage = function(event) { code.innerHTML = event.data; } worker.postMessage(code.textContent); }) ``` -------------------------------- ### C++ Class Title Highlighting and Keywords Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Improves C++ highlighting by making class titles consistent with other languages and adds support for rarely used keywords like `or`, `and`, and `not`. ```C++ // Example of C++ syntax (class titles and keywords) class MyClass { public: void process() { if (a and b or c) { /* ... */ } } }; ``` -------------------------------- ### Add Oracle and Postgres keywords to SQL Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Enhances the SQL language definition by adding keywords specific to Oracle and PostgreSQL databases. This improves the accuracy of SQL syntax highlighting for these platforms. ```SQL SELECT * FROM "my_table" WHERE "my_column" IS NOT NULL; ``` -------------------------------- ### RenderMan Shading Language and Bytestream Highlighting Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Version 3.0 includes highlighting support for RenderMan Shading Language and RenderMan Interface Bytestream, contributed by Konstantin Evdokimenko. ```renderman /* RenderMan Shading Language (RSL) Example */ surface my_surface(float Ka = 0.5; color Kd = color "grey") { Ci = Ka * Ia + Cs * (Kd * diffuse(N)); } ``` -------------------------------- ### Add missing Swift keywords Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Expands the keyword support for the Swift programming language. This update includes previously missing keywords, leading to more comprehensive Swift code highlighting. ```Swift Swift ``` -------------------------------- ### Add Lasso Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Integrates support for Lasso, a web scripting language. Eric Knibbe contributed this feature. ```APIDOC Language: Lasso Description: Adds Lasso syntax highlighting. Contributors: Eric Knibbe ``` -------------------------------- ### Rust Language Modernization and Keywords Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Updates the Rust language definition with new keywords and modernizes it significantly. This ensures accurate highlighting for contemporary Rust code. ```Rust // Example of Rust syntax (modernized) fn main() { let mut vec = Vec::new(); vec.push(1); } ``` -------------------------------- ### Add GAMS Language Support Source: https://github.com/squarebracketassociates/updatedpharobyexample/blob/pharo5/_support/html/highlightjs/CHANGES.md Introduces syntax highlighting for the GAMS (General Algebraic Modeling System) language. This allows for accurate parsing and display of GAMS models. ```GAMS GAMS ```