xamarin/Xamarin.Forms

[Bug] Label.Text comments not allowed after the first non-whitespace character.

Offen

#8.857 geöffnet am 11.12.2019

 (2 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C# (1.926 Forks)batch import
a/Xaml </>a/labele/4 :clock4:help wantedt/bug :bug:up-for-grabs

Repository-Metriken

Stars
 (5.644 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

<Label.Text> tag does not allow comments after the first non-whitespace character

Steps to Reproduce

  1. Clone repository here: https://github.com/jcummings2/LabelTextBug
  2. Try to build project

Alternately, you may also change any existing Label in a project to use the <Label.Text> tag like so:

<Label>
    <Label.Text>
Text can go here but you can't add a comment after it
<!-- Comment not allowed after first non-whitespace character -->
    </Label.Text>
</Label>

Expected Behavior

All comments should be ignored, regardless of where they occur.

Actual Behavior

XAML does not compile if there is a comment after the first non-whitespace character. The errors are:

  • On mac: Error: Specified cast is not valid.
  • On windows: Unable to cast object of type 'Xamarin.Forms.Xaml.ListNode' to type 'Xamarin.Forms.Xaml.IElementNode'.

Basic Information

  • Version with issue: 4.3.0.908675 (latest as of this writing)
  • Last known good version: ?
  • IDE: VS Pro for Mac 8.4 (Build 2535) and VS Pro for Windows 16.4.0
  • Platform Target Frameworks:
    • iOS: 8.0
    • Android: 9.0
  • Android Support Library Version: N/A
  • Nuget Packages: N/A
  • Affected Devices: N/A never gets that far

Screenshots

N/A

Reproduction Link

https://github.com/jcummings2/LabelTextBug/blob/master/LabelTextBug/MainPage.xaml#L6

Contributor Guide