Skip to content

Custom markers being shifted #9

Description

@andresatierf
return SuperRichText(
      text: text,
      style: style,
      useGlobalMarkers: false,
      othersMarkers: [
        MarkerText(
          marker: '//',
          style: const TextStyle(
            fontStyle: FontStyle.italic,
          ),
        ),
        MarkerText(
          marker: '>',
          style: TextStyle(
            fontSize: style.fontSize! * 0.8,
          ),
        ),
        MarkerText(
          marker: '^',
          style: const TextStyle(
            fontWeight: FontWeight.bold,
          ),
        ),
      ],
    );

Using the text
regular text //italic text 1// regular text //italic text 2// regular text
outputs the following
regular text regular text italic text 1 regular text_italic text 2_
the strings to be replaced are being shifted to the next position of the next one,
but using
regular text ^bold text 1^ regular text ^bold text 2^ regular text works as expected

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions