Skip to content

(VB.Net) Incorrect highlighting of Rem Comments #2851

@Greedquest

Description

@Greedquest

Describe the issue
The legacy Rem/REM statement is an alternative to the ' apostrophe literal for single line comments

Are you using highlight or highlightAuto?
Using highlight (via tag associations on SO)

Sample Code to Reproduce
https://jsfiddle.net/zv9k1hox/

Expected behavior
Rem is treated as a comment and doesn't affect highlighting of subsequent lines:

     Rem Tab to be replaced with \t
    If InStr(Content, vbTab) > 0 Then Content = Replace(Content, vbTab, "\t")
    
    Rem Double quote to be replaced with \"
    If InStr(Content, Chr(34)) > 0 Then Content = Replace(Content, Chr(34), "\" & Chr(34))
    Set EscapeJSON = Self
End Property

Public Function ToString(Optional ContentWrapper As String = "") As String
        ToString = ContentWrapper & this.Content & ContentWrapper
End Function

Public Property Get Content() As String
    Content = this.Content
End Property

Public Property Let Content(ByVal Value As String)
    this.Content = Value
End Property

Additional context
Triggered by this question on Code Review

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy