Skip to content
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
base: 61deecdc34fc
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 14b045668649
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

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
    aszlig committed Sep 2, 2018
    Copy the full SHA
    f865d0f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #45930 from aszlig/option-description-parbreak

    nixos: Split paras by \n\n in option descriptions
    grahamc committed Sep 2, 2018
    Copy the full SHA
    14b0456 View commit details
    Browse the repository at this point in the history