Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
base: 0d3cfcb958a3^
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
compare: ee2463cd71ec
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Sep 2, 2018

  1. nixos: Split paras by \n\n in option descriptions

    What annoyed me for a long time was the fact, that in order to break
    into a new paragraph, you need to insert </para><para> in the
    description attribute of an option.
    
    Now we will automatically create <para/> elements for every block that
    is separated by two consecutive newlines.
    
    I first tried to do this within options-to-docbook.xsl, but it turns
    out[1] that this isn't directly possible with XSLT 1.0, so I added
    another XSLT file that postprocesses the option descriptions that are
    now enclosed in <nixos:option-description/> by options-to-docbook.xsl.
    
    The splitting itself is a bit more involved, because we can't simply
    split on every \n\n because we'd also split text nodes of elements, for
    example:
    
      <screen><![CDATA[
    
        one line
    
        another one
    
      ]]></screen>
    
    This would create one <para/> element for "one line" and another for
    "another line", which we obviously don't want because <screen/> is used
    to display verbatim contents of what a user is seeing on the screen.
    
    So what we do instead is splitting *only* the top-level text nodes
    within the outermost <para/> and leave all elements as-is. If there are
    more than one <para/> elements at the top-level, we simply don't process
    it at all, because the description then already contains </para><para>.
    
    https://www.mhonarc.org/archive/html/xsl-list/2012-09/msg00319.html
    
    Signed-off-by: aszlig <aszlig@nix.build>
    Cc: @edolstra, @domenkozar
    (cherry picked from commit f865d0f)
    aszlig authored and samueldr committed Sep 2, 2018
    Configuration menu
    Copy the full SHA
    0d3cfcb View commit details
    Browse the repository at this point in the history
  2. nixos: Document option description changes

    This adds a release notes entry to make users (and especially
    developers) aware so they no longer need to use </para><para> in option
    descriptions as this is now done automatically on every two consecutive
    newlines.
    
    More details can be found in the commit message of f865d0f.
    
    Signed-off-by: aszlig <aszlig@nix.build>
    (cherry picked from commit 4652f2f)
    aszlig committed Sep 2, 2018
    Configuration menu
    Copy the full SHA
    ee2463c View commit details
    Browse the repository at this point in the history