Ticket #84 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Document#write indent documentation confusing

Reported by: Phrogz Owned by: ser
Priority: high Milestone: 3.1.7
Component: Other Version: 3.1.4
Severity: minor Keywords: write, indent, hierarchy, hierarchical, indented
Cc: gavin.kistner@… Ruby version: Other
Operating system: Windows

Description

Indentation produced by Document#write seems inconsistent with the documentation.

The docs say: "indent: An integer. If -1, no indenting will be used; otherwise, the indentation will be this number of spaces, and children will be indented an additional amount."

I read that to mean: "For a value of 1, each nested child will be indented by 1 more space than its parent. For a value of 3, each nested child will be indented by 3 more spaces than its parent."

Instead, it seems to mean: "Every level of indentation is always 2 spaces inset. For a value of 3, every item will be indented 3 more levels, 6 more spaces (2 * 3)."

This is with Ruby 1.8.5, REXML Version 3.1.4 (both options are missing from the Trac pulldowns).

Change History

Changed 2 years ago by ser

  • milestone set to 3.1.7

Changed 2 years ago by ser

  • version set to 3.1.4

The documentation needs a major rewrite, especially the tutorial.

Added 3.1.4 to the list of versions -- thanks for reminding me.

Changed 2 years ago by ser

  • status changed from new to closed
  • resolution set to fixed

The documentation has been changed. No, this changeset:1245 doesn't include broad fixes; just with respect to this ticket.

Note: See TracTickets for help on using tickets.