Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Spurious <div>-within-<p> produced in html output when multiple authors are present

未关闭
#522 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
html
领域
documentation

调研方向

从 html-render.rkt 中被覆盖的 render-compound-paragraph 方法开始,然后重现多作者 Scribble 示例并检查生成的 HTML。确定标题前后的内容是如何包装的;完成的标准是输出不再将 div 元素放置在 p 元素内,同时保留作者分隔符和周围内容。

由索引模型根据 Issue 内容生成。

描述

When multiple authors are present for a #language scribble/base document, the html renderer produces bogus <div class="SIntrapara">s within a <p> after the pre-title content and before the post-title content.

This presents two problems. First, the <div class="SIntrapara">s don't seem to serve any function. Perhaps they were intended to separate the authors, and the authors from subsequent content? But the authors are already separated by <span class="SAuthorSep">.

Second, as a block-level element, a <div> is not permitted within a <p>. The <p> is added in the overridden render-compound-paragraph method in html-render.rkt. I don't understand the purpose of wrapping a Scribble compound-paragraph in a <p> tag, as other occurrences of compound-paragraph can end up introducing both <div class="SIntrapara"> and other block-level tags such as <blockquote> within the <p> tag, which again, is not permitted by the html spec.

In the example html output I'm attaching, I've run Scribble's output through html-tidy reflow to make it readable.

Hmm, attaching files of type .scrbl and .rkt are not allowed. I'll add them as text in separate comments.

主要语言
Racket
星标
250
派生
102
平均合并
13 天 16 小时
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

racket/scribble 的其他 Issue

查看 racket/scribble 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。