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
Using the text
regular text //italic text 1// regular text //italic text 2// regular textoutputs 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 textworks as expected