Closed xorinzor closed 7 years ago
It would be helpful for us to see some code. This seems to work just fine for me:
$parser = new \JBBCode\Parser();
$parser->addCodeDefinition(\JBBCode\CodeDefinition::construct("font",
'<span style="font-family:{option}">{param}</span>',
true
));
$parser->parse('This contains a [font=Comic Sans MS]font[/font].');
echo $parser->getAsHTML();
@shmax I copied that code and it still doesn't work for me, same issue.
I'm running 1.3.0, that's the latest version, right?
hmm, with quotes it did work though, I guess it's messing up somewhere, glad to know it works fine.
Well, it looks like you still have a point about the no-quotes syntax; turns out I had an older version.
It looks like it broke on this line in this PR: https://github.com/jbowens/jBBCode/pull/25/files#diff-05290515a876ace0d971144e330e2894R445
@Schlaefer any thoughts?
The SCEditor creates a tag such as
[font=Comic Sans MS]
, the jBBCode parser however only returnsComic
as the attribute.Also when adding quotes it only returns
Comic
.