Fork me on GitHub
#devcards
<
2016-09-20
>
eyelidlessness01:09:55

when i require devcards.core i get this error:

Invalid regular expression: /[֑-ۯۺ-߿‏יִ-﷿ﹰ-ﻼ]/: Range out of order in character class
it comes from goog.i18n.bidi

eyelidlessness01:09:59

is anyone familiar with this?

eyelidlessness03:09:22

it appears to be from this dependency chain: - devcards.core - goog.dom - goog.html.SafeHtml - goog.i18n.bidi.Dir

eyelidlessness03:09:55

a glance at the source shows

goog.i18n.bidi.rtlChars_ =
    '\u0591-\u06EF\u06FA-\u07FF\u200F\uFB1D-\uFDFF\uFE70-\uFEFC';
the compiled version shows:
goog.i18n.bidi.rtlChars_="֑-ۯۺ-߿‏יִ-﷿ﹰ-ﻼ";

eyelidlessness03:09:44

i'm loading this from a file:/// url, could that cause some kind of corruption of the charset?

eyelidlessness03:09:45

aha, that is exactly what it was. added charset="UTF-8" to my script tag and it ran fine.

eyelidlessness15:09:35

i'm trying to get started with devcards (non figwheel project, should that matter) and i am having trouble getting any cards to render. something as simple as this...

(ns myns.examples
  (:require [devcards.core :as dc :refer-macros [defcard-rg]]))

(defcard-rg foo
  [:p "bar"])

(devcards.core/start-devcard-ui!)

anmonteiro15:09:00

@eyelidlessness are you passing :devcards true to your CLJS build?

anmonteiro15:09:19

and calling devcards.core/start-devcard-ui! ?

eyelidlessness15:09:27

yes (was in my code above)

eyelidlessness15:09:04

one thing i just spotted, i had not specified a :main in my cljsbuild. is that necessary? (spinning up a new build now to see if it makes a difference)

anmonteiro15:09:06

@eyelidlessness these problems are normally just tiny details. can you put a minimal repo together I can look at?

eyelidlessness15:09:42

yeah gimme a bit

eyelidlessness15:09:52

thanks for looking into this with me!

eyelidlessness15:09:20

haha i figured it out.

eyelidlessness15:09:36

:devcards true must be in the :compiler section of cljsbuild config. i had it up a level

eyelidlessness15:09:49

sorry for the dumb mistake 🙂

eyelidlessness15:09:17

is it possible to use mkdn-pprint-source as the docstring for a card, or do you need to use a separate defcard-doc?

kauko17:09:05

Probably not..? Not really sure though

eyelidlessness23:09:31

for anyone else wondering, i was able to render the source in a normal card using the doc macro