Skip to content

Inheritance from :default gives surprising merge behavior #97

@topolarity

Description

@topolarity

This merge surprisingly destroys the underline status:

julia> merge(StyledStrings.getface(:underline), StyledStrings.getface(:red))
StyledStrings.Face (sample)
          font: monospace
        height: 120
        weight: normal
         slant: normal
    foreground: ■ red
    background: ■ default
     underline: false
 strikethrough: false
       inverse: false

Printing also behaves this way, but only if you make the inheritance explicit:

My take-away from this is that Faces don't / shouldn't inherit from :default. Instead printing uses :default as the implicit styling start to start with (which is similar but not the same)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions