mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-24 17:59:39 +02:00
Draft of font-awesome support as described in issue #49.
This commit is contained in:
@@ -73,9 +73,15 @@ exports.addVertices = function (vert, g) {
|
||||
verticeText = vertice.text;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var labelTypeStr = '';
|
||||
if(conf.htmlLabels) {
|
||||
labelTypeStr = 'html';
|
||||
verticeText = verticeText.replace(/fa:fa[\w\-]+/g,function(s,t,u){
|
||||
return '<i class="fa '+ s.substring(3)+'"> ';
|
||||
});
|
||||
|
||||
} else {
|
||||
verticeText = verticeText.replace(/<br>/g, "\n");
|
||||
labelTypeStr = 'text';
|
||||
|
@@ -303,10 +303,6 @@ exports.encodeEntities = function(text){
|
||||
|
||||
});
|
||||
|
||||
//txt = txt.replace(/fa:fa[\w\-]+/g,function(s,t,u){
|
||||
// return 'fa:¢';
|
||||
//});
|
||||
|
||||
return txt;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user