dashing
dashing copied to clipboard
selector: pasing qoutes in json string
Hi
I am trying to create a docset using dashing. My source html files have many class patterns. So i would like to change the "selectors" in json. But json has a string value format and the pattern that I want to match contains quotes, see code below. The entry I would like to see in dash.docset is getDescription
and getExtraInfo
from the html below
<tr class="memitem:aca99d01db1cef4b261dccc86da5523d7"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classGKTSDescription.html">GKTSDescription</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classGKTimeSerie.html#aca99d01db1cef4b261dccc86da5523d7">getDescription</a> () const</td></tr>
--
| <tr class="separator:aca99d01db1cef4b261dccc86da5523d7"><td class="memSeparator" colspan="2"> </td></tr>
| <tr class="memitem:a7387ac98f82fae5ed21990eabfa9a074"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGKTimeSerie.html#a80221b55251c17773951ff42bb3835c5">ExtraInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGKTimeSerie.html#a7387ac98f82fae5ed21990eabfa9a074">getExtraInfo</a> () const</td></tr>
I tried selectors with escape character \
before "
, see code below
{
"name": "Dashing",
"package": "dashing",
"index": "index.html",
"selectors": {
"h2 class=\"memtitle": "Command",
"tr class=\"memitem": "Function"
},
"ignore": [
"ABOUT"
],
"icon32x32": "",
"allowJS": false,
"ExternalURL": ""
}
I get the following error when building docset
panic: parsing "h2 class=\"memtitle": 10 bytes left over
How do I resolve this issue?
Thank you.
Clearly this is a super old issue, but thought I'd answer for anyone not familiar with css path selectors.
When referencing a class in a css selector, you use the dot
character (i.e. period "."). So instead of "h2 class=\"momtitle"
, you would have "h2.memtitle"
So your code would look like:
{
"name": "Dashing",
"package": "dashing",
"index": "index.html",
"selectors": {
"h2.memtitle": "Command",
"tr.memitem": "Function"
},
"ignore": [
"ABOUT"
],
"icon32x32": "",
"allowJS": false,
"ExternalURL": ""
}