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

Open
#522 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
html
Domain
documentation

Research direction

Start in html-render.rkt at the overridden render-compound-paragraph method, then reproduce the multiple-author Scribble example and inspect the generated HTML. Determine how the pre-title and post-title content is wrapped; done means the output no longer places div elements inside p elements while preserving the author separators and surrounding content.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Racket
Stars
250
Forks
102
Avg merge
11d 11h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

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.

More from racket/scribble

All issues in racket/scribble

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.