Logo FSharp.Formatting

HtmlFormat Type

Generates color-coded HTML 4.01 from HTML/XML/ASPX source code.

This implementation assumes that code inside <script> blocks is JavaScript, and code inside <% %> blocks is C#.

The default tab width is set to 2 characters in this class.

Constructors

Constructor Description

HtmlFormat()

Full Usage: HtmlFormat()


              

Inherited members

Inherited from SourceFormat

Instance members

Instance member Description

this.FormatCode

Full Usage: this.FormatCode

Parameters:
    source : Stream - Source code stream.

Returns: string A string containing the HTML formatted code.

Transforms a source code stream to HTML 4.01.

source : Stream

Source code stream.

Returns: string

A string containing the HTML formatted code.

this.FormatCode

Full Usage: this.FormatCode

Parameters:
    source : string

Returns: string A string containing the HTML formatted code.

Transforms a source code string to HTML 4.01.

source : string
Returns: string

A string containing the HTML formatted code.

this.FormatSubCode

Full Usage: this.FormatSubCode

Parameters:
    source : string

Returns: string

Allows formatting a part of the code in a different language, for example a JavaScript block inside an HTML file.

source : string
Returns: string

this.TabSpaces

Full Usage: this.TabSpaces

Returns: byte

Gets or sets the tabs width.

Returns: byte

this.LineNumbers

Full Usage: this.LineNumbers

Returns: bool

Enables or disables line numbers in output.

Returns: bool

this.Alternate

Full Usage: this.Alternate

Returns: bool

Enables or disables alternating line background.

Returns: bool

this.EmbedStyleSheet

Full Usage: this.EmbedStyleSheet

Returns: bool

Enables or disables the embedded CSS style sheet.

Returns: bool

this.CodeRegex

Full Usage: this.CodeRegex

Returns: Regex

The regular expression used to capture language tokens.

Returns: Regex

Static members

Static member Description

SourceFormat.GetCssStream()

Full Usage: SourceFormat.GetCssStream()

Returns: Stream A text Stream of the CSS definitions.

Gets the CSS stylesheet as a stream.

Returns: Stream

A text Stream of the CSS definitions.

SourceFormat.GetCssString()

Full Usage: SourceFormat.GetCssString()

Returns: string A string containing the CSS definitions.

Gets the CSS stylesheet as a string.

Returns: string

A string containing the CSS definitions.

SourceFormat.EscapeHtml(str, tabSpaces)

Full Usage: SourceFormat.EscapeHtml(str, tabSpaces)

Parameters:
    str : string
    tabSpaces : int

Returns: string

TBD

str : string
tabSpaces : int
Returns: string

Type something to start searching.