I am trying to create my own custom tags (say a tag called "ishita") to Haruki template
else if (element.kind === 'ishita') {
if (!parentNode.ishita) {
parentNode.ishita = [];
}
var thisishita = {
'name':
element.name,
'description': element.description || '',
'access': element.access || '',
// 'virtual': !!element.virtual
};
parentNode.ishita.push(thisishita);
graft(thisishita, childNodes, element.longname,
element.name);
}
3. Added @ishita tag in my source files.
By doing this I was able to create my own custom tag which is awesome.
I just wanted to know if it is correct way of doing it or not.
Because
when I tried adding more custom tags such as , I was not able to..as in it was
not able to recognize them..not sure why...Please let me know if this is
doable or not.
Perhaps, I was doing something wrong while creating the other custom tags which i was not able to see.
Also, I am trying to add custom properties to the existing tags.
For instance, @member can have properties @name, @description and more, Now i want to add another property @observable.
In order to do that I did the following changes in publish file:
else if (element.kind === 'member') {
if (!parentNode.properties) {
parentNode.properties = [];
}
parentNode.properties.push({
'name':
element.name,
'access': element.access || '',
'description': element.description || '',
'type': element.type ? (element.type.length === 1 ? element.type[0] : element.type) : '',
'observable': element.observable||false });
}
I also added this tag in my comments of the source code.
Now, the output xml file does have this extra tag as observable but it doesnt take the value written after the tag in comments.
I am not sure what am I missing.