Skip to content

fix getCharWidth #14

@decioferreira

Description

@decioferreira

Currently the implementation of Parse.Primitives.getCharWidth is very poor. We need to fix it.

One of the current issue shows up when trying to compile examples/src/HttpQuotes.elm:

% cd examples
% % guida make src/HttpQuotes.elm                 
Compiled in DEBUG mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
Detected problems in 1 module.
-- ENDLESS STRING ------------------------------------------ /src/HttpQuotes.elm

I got to the end of the line without seeing the closing double quote:

115|                     [ text "— "

                                  ^

Strings look like "this" with double quotes on each end. Is the closing double quote missing in your code?

Note: For a string that spans multiple lines, you can use the multi-line string syntax like this:

    """

    # Multi-line Strings

    

    - start with triple double quotes

    - write whatever you want

    - no need to escape newlines or double quotes

    - end with triple double quotes

    """

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions