Tweak language in warning for bad fenced divs

オープン 初心者向け
#12,361 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
lua
領域
cli

調査の方向性

src/resources/filters/normalize/astpipeline.lua の 341 行目付近、::: に関する警告が出力される箇所から始めます。Issue にあるフェンス付きコードの例を再現し、既存の検出を維持しながら、欠落している改行箇所を特定しやすくなるよう警告を修正します。完了条件は、その例でより明確な警告文が生成されることです。

索引モデルが issue の本文から書いたものです。

説明

enhancement

In 1.7, missing newlines before code cells produce a warning about :::. This is the correct behavior, code cells should be prefaced by a newline. However, since the warning may be unexpected for documents that didn't previously generate a warning, we might consider tweaking the language to help people find the problem.

Example

Consider the following document:

---
title: "Untitled"
format: html
---

This does it:
```{r}
1 + 1
```

In 1.6, it is rendered without warning. Intermediate markdown:

---
title: "Untitled"
format: html
keep-md: true
---




This does it:


::: {.cell}

```{.r .cell-code}
1 + 1
```

::: {.cell-output .cell-output-stdout}

```
[1] 2
```


:::
:::

In 1.7, the missing newline before the code chunk, propagates to the markdown:

---
title: "Untitled"
format: html
keep-md: true
---

This does it:
::: {.cell}

```{.r .cell-code}
1 + 1
```

::: {.cell-output .cell-output-stdout}

```
[1] 2
```


:::
:::

An results in the warning:

WARNING (/Users/charlottewickham/Documents/posit/quarto-cli/src/resources/filters/./normalize/astpipeline.lua:341) 
The following string was found in the document: :::

This usually indicates a problem with a fenced div in the document. Please check the document for errors.
主要言語
JavaScript
スター
6k
フォーク
458
平均マージ
1日 9時間
マージ済み PR(30日)
41

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quarto-dev/quarto-cli のほかの issue

quarto-dev/quarto-cli の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。