Fork me on GitHub
#garden
<
2017-09-15
>
dfcarpenter00:09:56

I'm having some issues with garden parsing some content fields, specifically errors with some of the entities/glyph codes e.g. "\039F". Is there something special I need to do or is this not possible?

niamu06:09:53

@dfcarpenter Do you have a sample of the code you’ve tried? I can help try to work out a solution.

dfcarpenter16:09:47

`

[:li.progtrckr-todo {:color "silver"
                        :border-bottom "4px solid silver"}
    [:&:before {:content "\039F"
                :color "silver"
                :background-color "#fff"
                :width (em 1.2)
                :line-height (em 1.4)}]
    [:&:hover:before {:color "#ff4500"}]]

`

dfcarpenter16:09:17

Error: java.lang.IllegalArgumentException: Invalid digit: 9, compiling:(frontend/wizard.clj:32:31)

manutter5116:09:17

@dfcarpenter “\039f” isn’t a valid character string. IIRC, the “\0" prefix means octal notation, which can only have digits 0-7. Maybe you meant “\u039f”?

dfcarpenter16:09:45

I was looking at this

dfcarpenter16:09:15

`
p:before { content:"\039f"; }
`

dfcarpenter16:09:20

It has that example for a micron

manutter5116:09:24

Ah, my guess would be that the string works in straight CSS, but since you’re using garden, it starts out being a Java string and gets interpreted under Java rules.

manutter5116:09:46

So to translate it to Java, add the “u” after the “\”

dfcarpenter16:09:55

ahh yes. I tried that and it worked

dfcarpenter16:09:07

An unrelated question have you used garden 2.0? Is it worth switching to?

manutter5117:09:28

Not me, no. I’m lurking here because I’ve always been interested in the premise of garden, but I never really got around to using it “in anger”.