@auto-rst doesn't save text

Bug #1243855 reported by tbnorth
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
leo-editor
Fix Released
Medium
Edward K. Ream

Bug Description

rev. 6174

Create this outline (two nodes, child node with text)

@auto-rst some.rst
    Top level title

    Text here

expectation: some.rst contains

    Top level title
    ============

    Text here

result:

Traceback (most recent call last):

  File "/mnt/usr1/usr1/home/tbrown/Package/leo/bzr/leo.repo/trunk/leo/core/leoFileCommands.py", line 2034, in writeAllAtFileNodesHelper
    c.atFileCommands.writeAll()

  File "/mnt/usr1/usr1/home/tbrown/Package/leo/bzr/leo.repo/trunk/leo/core/leoAtFile.py", line 3240, in writeAll
    self.writeAllHelper(p,force,toString,writeAtFileNodesFlag,writtenFiles)

  File "/mnt/usr1/usr1/home/tbrown/Package/leo/bzr/leo.repo/trunk/leo/core/leoAtFile.py", line 3316, in writeAllHelper
    at.writeOneAtAutoNode(p,toString=toString,force=force)

  File "/mnt/usr1/usr1/home/tbrown/Package/leo/bzr/leo.repo/trunk/leo/core/leoAtFile.py", line 3423, in writeOneAtAutoNode
    at.replaceTargetFileIfDifferent(root,ignoreBlankLines=isAtAutoRst)

  File "/mnt/usr1/usr1/home/tbrown/Package/leo/bzr/leo.repo/trunk/leo/core/leoAtFile.py", line 5305, in replaceTargetFileIfDifferent
    ok = self.create(at.targetFileName,s)

  File "/mnt/usr1/usr1/home/tbrown/Package/leo/bzr/leo.repo/trunk/leo/core/leoAtFile.py", line 5425, in create
    assert g.isUnicode(s),(type(s),repr(s))

AssertionError: (<type 'str'>, "'Top level title\\n===============\\n\\nText here\\n\\n'")

Revision history for this message
Edward K. Ream (edreamleo) wrote :

This may already have been fixed. If not, it will be fixed for Leo 4.11.1

Changed in leo-editor:
importance: Undecided → Medium
assignee: nobody → Edward K. Ream (edreamleo)
milestone: none → 4.11.1
Revision history for this message
Edward K. Ream (edreamleo) wrote :

I'm marking this as "fix released" so it no longer appears in searches.

A link to this bug now appears here: https://github.com/leo-editor/leo-editor/issues/73

Changed in leo-editor:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.