Skip to content

Commit

Permalink
Updated parser, no duplicate heading
Browse files Browse the repository at this point in the history
  • Loading branch information
markseuffert committed Jul 29, 2024
1 parent 6139298 commit b09ed3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions system/extensions/update-available.ini
Original file line number Diff line number Diff line change
Expand Up @@ -503,14 +503,14 @@ system/themes/karlskrona.css: karlskrona.css, create, update, careful
system/themes/karlskrona.png: karlskrona.png, create

Extension: Markdown
Version: 0.9.1
Version: 0.9.2
Description: Text formatting for humans.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-markdown/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-markdown
DocumentationLanguage: en, de, sv
Published: 2024-04-04 14:58:34
Published: 2024-07-29 22:19:58
Status: available
system/workers/markdown.php: markdown.php, create, update

Expand Down
4 changes: 2 additions & 2 deletions system/extensions/yellow-extension.ini
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ media/downloads/yellow-svenska.pdf: yellow-svenska.pdf, create
./robots.txt: robots.txt, create

Extension: Markdown
Version: 0.9.1
Version: 0.9.2
Description: Text formatting for humans.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-markdown/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-markdown
DocumentationLanguage: en, de, sv
Published: 2024-04-04 14:58:34
Published: 2024-07-29 22:19:58
Status: available
system/workers/markdown.php: markdown.php, create, update

Expand Down
4 changes: 3 additions & 1 deletion system/workers/markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Markdown extension, https://github.com/annaesvensson/yellow-markdown

class YellowMarkdown {
const VERSION = "0.9.1";
const VERSION = "0.9.2";
public $yellow; // access to API

// Handle initialisation
Expand Down Expand Up @@ -4074,6 +4074,8 @@ public function getIdAttribute($text) {
if (!isset($this->idAttributes[$text])) {
$this->idAttributes[$text] = $text;
$attr = " id=\"$text\"";
} else {
$attr = " id=\"error-duplicate-heading\"";
}
return $attr;
}
Expand Down

0 comments on commit b09ed3e

Please sign in to comment.