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
is anyone familiar with this?
it appears to be from this dependency chain: - devcards.core - goog.dom - goog.html.SafeHtml - goog.i18n.bidi.Dir
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_="֑-ۯۺ-߿יִ-﷿ﹰ-ﻼ";
i'm loading this from a file:///
url, could that cause some kind of corruption of the charset?
aha, that is exactly what it was. added charset="UTF-8"
to my script tag and it ran fine.
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!)
@eyelidlessness are you passing :devcards true
to your CLJS build?
yes
and calling devcards.core/start-devcard-ui!
?
yes (was in my code above)
ooops
right
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)
no difference.
@eyelidlessness these problems are normally just tiny details. can you put a minimal repo together I can look at?
yeah gimme a bit
thanks for looking into this with me!
haha i figured it out.
:devcards true
must be in the :compiler
section of cljsbuild config. i had it up a level
sorry for the dumb mistake 🙂
is it possible to use mkdn-pprint-source
as the docstring for a card, or do you need to use a separate defcard-doc
?
Probably not..? Not really sure though
for anyone else wondering, i was able to render the source in a normal card using the doc
macro