### Method

# GtkSource Buffer get_markup

since: 5.18

#### Declaration [src]

    char*
    gtk_source_buffer_get_markup (
      GtkSourceBuffer* buffer,
      GtkTextIter* start,
      GtkTextIter* end
    )

#### Description [src]

Returns the text in the specified range converting any text formatting to equivalent Pango markup tags. This allows the styled text to be displayed in other widgets that support Pango markup, such as `GtkLabel`.

For very long ranges this function can take long enough that you could potentially miss frame renderings.

Available since: 5.18

#### Parameters

`start`

  Type: `GtkTextIter`

  Start of range as a `GtkTextIter`.

  The data is owned by the caller of the method.

`end`

  Type: `GtkTextIter`

  End of range as a `GtkTextIter`.

  The data is owned by the caller of the method.

#### Return value

Type: `char*`

A newly-allocated string containing the text with Pango markup, or `NULL` if `start` and `end` are invalid.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.