Changeset a400958 in rtems-central for rtemsqual/content.py


Ignore:
Timestamp:
Mar 17, 2020, 1:29:26 PM (15 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
28b8f50
Parents:
b459114
git-author:
Sebastian Huber <sebastian.huber@…> (03/17/20 13:29:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/17/20 15:27:24)
Message:

content: Add method to add lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsqual/content.py

    rb459114 ra400958  
    119119
    120120
     121def _make_lines(lines):
     122    if not isinstance(lines, list):
     123        return lines.strip("\n").split("\n")
     124    return lines
     125
     126
    121127class SphinxContent(object):
    122128    """ This class builds Sphinx content. """
     
    150156        else:
    151157            self._content += "\n"
     158
     159    def add_lines(self, lines, indent=0):
     160        """ Adds a lines to the content. """
     161        for line in _make_lines(lines):
     162            self.add_line(line, indent)
    152163
    153164    def add_index_entries(self, entries):
Note: See TracChangeset for help on using the changeset viewer.