On Saturday, October 8, 2016 at 3:38:57 PM UTC-5, Edward K. Ream wrote: As of rev ae40ad3 the new javascript importer seems ready for prime time. >
Some notes re the latest code, rev deec885: *gen_refs = False* This switch is False at present because @auto does not presently support section references. #321 <https://github.com/leo-editor/leo-editor/issues/321> says that @auto should. When gen_refs is False, the code generates only @others directives, never section references. @others isn't being indented as much as it should. As a result, child nodes aren't being unindented as much as they could be. There are two possible approaches: 1. Indent @others by 4 spaces everywhere except the top node, and unindent all children by the maximum amount. This will have the effect of regularizing indentation automatically. This should at least be an option. 2. Do some AI to calculate the maximum indentation possible for @others, and then indent all children by *that* amount. The present code attempts to do this, and fails. In fact, the code must keep track of the indentation of *parent* @others directives. I'll attempt this later, perhaps today. *gen_refs = True* When this switch is True, the new code does an excellent job of generating section references. In particular, the root @auto node now shows the structure of the entire file as clearly as possible. It's great stuff. Because of this success, #321 <https://github.com/leo-editor/leo-editor/issues/321> has become a much higher priority. I'll see what I can do asap. As I write this, I realize that the indentation of section references suffers the same kind of problems as with @others. The fix will be largely the same as discussed above. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
