Coverage for C:\leo.repo\leo-editor\leo\plugins\writers\dart.py: 40%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1#@+leo-ver=5-thin
2#@+node:ekr.20141116100154.2: * @file ../plugins/writers/dart.py
3"""The @auto write code for Emacs org-mode (.org) files."""
4# pylint: disable=unused-import
5from leo.core import leoGlobals as g
6import leo.plugins.writers.basewriter as basewriter
8class DartWriter(basewriter.BaseWriter):
9 """The writer class for .dart files."""
10 # def __init__(self,c):
11 # super().__init__(c)
12 #@+others
13 #@+node:ekr.20141116100154.4: ** dart.write
14 def write(self, root):
15 """Write all the *descendants* of an .dart node."""
16 root_level = root.level()
17 for p in root.subtree():
18 indent = p.level() - root_level
19 self.put('%s %s' % ('*' * indent, p.h))
20 for s in p.b.splitlines(False):
21 if not g.isDirective(s):
22 self.put(s)
23 root.setVisited()
24 return True
25 #@-others
27writer_dict = {
28 '@auto': [],
29 'class': DartWriter,
30 'extensions': ['.dart',],
31}
32#@@language python
33#@@tabwidth -4
34#@-leo