dashing
dashing copied to clipboard
Matchpath doesn't work?
Hello. Thanks for the project. It's saved me a lot of work getting a docset together.
I'm trying to use the matchpath option for one of my selectors but it seems to be completely ignored. I tried passing what I thought would be an invalid regex, just to make sure the option was getting parsed but nothing happened (i.e. it didn't break).
{
"name": "RxJS",
"package": "rxjs",
"index": "./rxjs/tmp/docs/index.html",
"selectors": {
".self-detail.detail h1": "Class",
".detail h3 [data-ice='name']": "Method",
"[data-ice='content'] > h1": {
"type": "Guide",
"matchpath": "docs/(test-file[|food)/.*\\.html"
}
},
"ignore": [
"ABOUT"
],
"icon32x32": "./icon32x32.png",
"allowJS": true
}
Am I missing something?
With that invalid regex I was trying to trigger this code path.
@iansinnott I guess you're using the prebuilt binary downloaded from the releases, as I was, and that seems to be the problem. I just discovered, reading issue #21, that matchpath was commited after the last release version available. So, to use matchpath it's necessary to build the project from source.
Ah, interesting @fturcheti. thanks for the heads up that sounds like it might indeed be the issue.
I ended up introducing a processing step for each HTML file before running it through dashing, and that solved all my problems. Still though, it sounds like an up to date release of the binary would be good.
It may not be ideal to introduce a HTML manipulation step, but I found it generally necessary since I needed to remove navigation / headers from documentation. If anyone is interested here's what I did: https://github.com/iansinnott/rxjs-dash-docset/blob/master/process-html.js#L17