InvisibleCharacters

Field in ReplacementMarkerResult

Summary

The number of invisible characters added into the line during processing.

public int InvisibleCharacters;

Remarks

This will vary depending on what the replacement markup needs to do.

  • When only inserting rich-text tags, this should be the length of all inserted text. For example "this is text with [bold]some bold[/bold] elements" translated into Unity style rich-text become "this is text with <b>some bold</b> elements". In this case then the value of InvisibleCharacters would be seven.

  • When only modifying the content of the children text, such as making all text upper case, this should be 0. For example "this is text with [upper]some uppercased[/upper] elements" is transformed into "this is text with SOME UPPERCASED elements". The number of invisible character will be zero.

  • When adding new content into the line (regardless of being added at the start, end, or middle) this should be zero but the replacement processor should make sure to shift along it's children attributes where appropriate. For example "this is text with [emph]some emphasised[/emph] elements" transformed into "this is text with !!some emphasised!! elements" the value of InvisibleCharacters would be zero. In this case however the childAttributes in ProcessReplacementMarker(MarkupAttribute,System.Text.StringBuilder,List<MarkupAttribute>,string) would need to be shifted down two.

Last updated

Was this helpful?