Skip to content

printf / sprintf formatting strings with format specifiers are not always colored correctly #4708

@abelbraaksma

Description

@abelbraaksma

See screenshot, these formatting specifiers are not colored:

image

Repro steps

As an example, try the following code:

let frq = System.Diagnostics.Stopwatch.Frequency
let ns = 1. / float frq * 1000000000.
let µs = 1. / float frq * 1000000.
sprintf "[INIT] Timer accuracy is %i ticks/s, %5.2fns per tick, %1.5fµs per tick" frq ns µs

Expected behavior

The whole of %5.2f and %1.5f should be colored in a green font (in the default dark color scheme).

Actual behavior

See screenshot above, they arent't colored properly.

Known workarounds

None / n/a

Related information

VS 2017 15.7 Update 2, Windows 7 / 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions