Skip to content

GenericAspxLexer error when resources are used #329

Description

@Anteru

(Original issue 622 created by holiman on 2010-12-16T09:04:18.991123+00:00)

When using a VbNetAspxLexer parsing a file which begins like this :

{{{
#!asp

<%@ Page Language="VB" MasterPageFile="~/Includes/Foo.master" Title="<%$Resources:Resource, FOO_BAR %>" %>
}}}

The parser mistakes the first %> as the end of the tag, and does not invoke the vb-parser correctly.
From GenericAspLexer:
{{{
#!python
tokens = {
'root': [
(r'(<%[@=#]?)(.?)(%>)', bygroups(Name.Tag, Other, Name.Tag)),
(r'(<script.
?>)(.*?)(</script>)', bygroups(using(XmlLexer),
Other,
using(XmlLexer))),
(r'(.+?)(?=<)', using(XmlLexer)),
(r'.+', using(XmlLexer)),
],
}
}}}

The expression '(<%[@=#]?)(.*?)(%>)' stops at the first %>.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lexingarea: changes to individual lexersS-majorseverity: majorT-bugtype: a bugX-importedimported from Bitbucket

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions