Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipe character breaks the highlighting #4

Open
Cyberbeni opened this issue Dec 22, 2020 · 1 comment
Open

Pipe character breaks the highlighting #4

Cyberbeni opened this issue Dec 22, 2020 · 1 comment

Comments

@Cyberbeni
Copy link

My stencil file:

// sourcery:inline:auto:{{ type.name }}.init
public init({% for variable in type.storedVariables %}{{variable.name}}: {{variable.typeName}}{% ifnot forloop.last %}, {% endif %}{% endfor %}) {
{% for variable in type.storedVariables %}
    self.{{variable.name}} = {{variable.name}}
{% endfor %}
}
// sourcery:end
{% endfor %}

{% for type in types.all where type|annotated:"isEqual" %}
// sourcery:inline:auto:{{ type.name }}.isEqual
override public func isEqual(to object: Any?) -> Bool {
    guard let other = object as? {{type.localName}} else { return false }
    return {% for variable in type.storedVariables %}{{variable.name}} == other.{{variable.name}}{% ifnot forloop.last %} &&
        {% endif %}{% endfor %}
}
override public var hash: Int {
    var hasher = Hasher()
{% for variable in type.storedVariables %}
    hasher.combine({{variable.name}})
{% endfor %}
    return hasher.finalize()
}
// sourcery:end
{% endfor %}

Looks like this:
https://user-images.githubusercontent.com/8356175/102830624-05952200-43ea-11eb-8990-34165a1f17cf.png

Same result with current version from marketplace and the version in #2

@MarcoEidinger
Copy link

MarcoEidinger commented Feb 11, 2021

@Cyberbeni I struggled with that myself but this solved it for me and I use a forked extension since then.

Will show your stencil file as follows:

Screen Shot 2021-02-11 at 1 21 33 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants