Skip to content

Labeled list indentation in 6.8+ darkfish is inconsistent with previous versions #1227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
flavorjones opened this issue Dec 6, 2024 · 4 comments
Labels

Comments

@flavorjones
Copy link
Collaborator

Labeled list indentation seems to have changed, and I'm not sure that it was an intentional change.

Previously, the list syntax [title] always had a visual line break before the value, while title:: stayed on the same line. Now, the value always starts on the same line as the title.

From the RDoc::MarkupReference docs, here's how it renders in older darkfish:

image

And here's how it renders with the style changes in 6.8:

image

As a result, markup like this:

# [Parameters]
# - +input+ (String) RELAX NG schema definition
# - +options:+ (Nokogiri::XML::ParseOptions)
#   Defaults to ParseOptions::DEFAULT_SCHEMA

which used to render well:

image

now renders oddly:

image

I'll take a look in the next few days, but wanted to capture what I'm seeing before I forget.

@st0012
Copy link
Member

st0012 commented Dec 6, 2024

Seems to be related to #1199 too

@flavorjones
Copy link
Collaborator Author

@st0012 Yes, I hadn't seen that one, but they are related.

Here's a more complex example of the strange styling with labeled lists:

      # [Required Parameters]
      # - +input+ (String | IO): The \XML document to parse.
      #
      # [Optional Parameters]
      # - +url:+ (String) The base URL of the document.
      # - +encoding:+ (String) The name of the encoding of the document.
      # - +options:+ (Integer | ParseOptions) Options to control the parser behavior.
      #   Defaults to +ParseOptions::STRICT+.
      #
      # [Yields]
      # If present, the block will be passed a Nokogiri::XML::ParseOptions object to modify before
      # the fragment is parsed. See Nokogiri::XML::ParseOptions for more information.

image

@flavorjones
Copy link
Collaborator Author

#1209 is a great fix for this issue, I +1ed it there.

@st0012
Copy link
Member

st0012 commented Dec 8, 2024

Closing as I've merged #1209

@st0012 st0012 closed this as completed Dec 8, 2024
@st0012 st0012 added the bug label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants