mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
update source storage on set markup
This commit is contained in:
parent
48fc68de7e
commit
ba7a56ca7e
2 changed files with 13 additions and 13 deletions
|
|
@ -25,13 +25,13 @@ use \Yggverse\Net\Address;
|
||||||
class Gemtext extends Markup
|
class Gemtext extends Markup
|
||||||
{
|
{
|
||||||
public function set(
|
public function set(
|
||||||
string $value,
|
string $source,
|
||||||
string | null &$title = null,
|
string | null &$title = null,
|
||||||
bool $preformatted = false
|
bool $preformatted = false
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$document = new Document(
|
$document = new Document(
|
||||||
$value
|
$this->_source = $source
|
||||||
);
|
);
|
||||||
|
|
||||||
$line = [];
|
$line = [];
|
||||||
|
|
@ -248,15 +248,6 @@ class Gemtext extends Markup
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function _onSizeAllocate(
|
|
||||||
GtkLabel $label,
|
|
||||||
GdkEvent $event
|
|
||||||
): bool
|
|
||||||
{
|
|
||||||
// @TODO
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function _onActivateLink(
|
protected function _onActivateLink(
|
||||||
GtkLabel $label,
|
GtkLabel $label,
|
||||||
string $href
|
string $href
|
||||||
|
|
@ -314,6 +305,15 @@ class Gemtext extends Markup
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function _onSizeAllocate(
|
||||||
|
GtkLabel $label,
|
||||||
|
GdkEvent $event
|
||||||
|
): bool
|
||||||
|
{
|
||||||
|
// @TODO
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private function _wrap(
|
private function _wrap(
|
||||||
string $value
|
string $value
|
||||||
): string
|
): string
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,14 @@ use \Yggverse\Yoda\Abstract\Entity\Browser\Container\Page\Content\Markup;
|
||||||
class Plain extends Markup
|
class Plain extends Markup
|
||||||
{
|
{
|
||||||
public function set(
|
public function set(
|
||||||
string $value
|
string $source
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->gtk->set_markup(
|
$this->gtk->set_markup(
|
||||||
sprintf(
|
sprintf(
|
||||||
'<tt>%s</tt>',
|
'<tt>%s</tt>',
|
||||||
htmlspecialchars(
|
htmlspecialchars(
|
||||||
$value
|
$this->_source = $source
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue