craftcms / craftcms/docs

Fix URLs in fenced code blocks being double-parsed

Open
#465 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
JavaScript
Stars
42
Forks
160
Avg merge
3h 9m
Merged PRs (30d)
4

Description

In #464, @leevigraham pointed out that there were some < and > characters sneaking into output—but in way that suggests docblocks are getting parsed "too early" and ignoring fenced code blocks?

This may only be an issue when using the Vuepress-stlyle ::: code components.

No matter, we need to sort out whether this is something we can address with careful formatting in the Craft source, or if there is a solve at the automation level, i.e. with our use of yiisoft/yii2-apidoc (or Vuepress itself).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the escaped characters in URLs inside fenced code blocks, especially Vuepress-style ::: code components. Compare the Craft source formatting with the automation using yiisoft/yii2-apidoc and Vuepress, then determine which layer should prevent double parsing; done means the rendered documentation preserves those URLs correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, tooling
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.