fix(packages): render Markdown on provider View Details - #10
Open
Ibochkarev wants to merge 2 commits into
Open
Conversation
Provider package description/instructions/changelog were shown as raw Markdown (e.g. Omise). Parse those fields with Parsedown safeMode and reuse the helper for local GetAttribute attributes.
Source SCSS stays; theme CSS is rebuilt at release, not in this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что сделано
Экстра на modx.com отдают Markdown в description, instructions и changelog. В Package Manager → View Details эти поля приходили как сырой текст, поэтому Omise показывал ссылки
[Omise](…)и заголовки## Setupвместо форматированного HTML.Добавил
PackageMarkdown(Parsedown сsafeMode) и запускаю его вWorkspace/Packages/Rest/GetListдля payload списка/деталей провайдера. ЛокальныйGetAttributeпереиспользует тот же хелпер для транспортных атрибутов.licenseпровайдера остаётся plain text для блока Information. CSS дляcode/pre/imgтеперь также применяется под#modx-package-browser-details-main.Как проверить
[Omise](https://www.omise.co).Setup,Customising the Payment Form) и стилизованный блок кода.<p>.Связанные
Refs modxcms#15329
Связанные: Markdown для локальных атрибутов пакета пришёл в modxcms#13853 / modxcms#16829; это расширяет ту же идею на provider View Details.
Совместимость
Менеджер Package Management + провайдеры modx.com (или другие). PHP 8.1+. Использует существующую зависимость
erusev/parsedown. CSS дефолтной темы обновлён из_package-management.scss.Оригинал: modxcms#17001