Pebble App Framework: Phone API
    Preparing search index...

    Function plainDescription

    • Turns an event's raw notes into plain text.

      Each HTML tag is taken out with nothing in its place, as the built-in does, so a <br> between two lines joins them and the line breaks the text already has stay. A < or > that starts no tag stays, and so do a comment and a <!DOCTYPE>, since neither starts with a letter. Entities such as &amp; stay as written, which the built-in leaves too. The text is trimmed, and one longer than 300 characters is cut to 299 with … on the end. Characters are counted as code points, so an emoji counts as one and is never cut in half.

      Parameters

      • raw: string | null | undefined

        The notes as the calendar gave them, which may be missing.

      Returns string

      The plain text, empty when there is none.