Cannot import monsters with italic lines in the power description

Project:Virtual Combat Cards Project
Version:1.2.0
Component:Code
Category:bug report
Priority:normal
Assigned:Nebulorum
Status:closed
Description

There are still some capture issues with version 1.1.1. Specifically some of the monsters have non-breaking spaces embedded in them; the non-breaking spaces prevent VCC from capturing the monster.

One example is the Chimera

http://www.wizards.com/dndinsider/compendium/monster.aspx?id=115

Trying to capture it gives the following error:

Virtual Combat Cards replied: Could not process capture correctly. Save XML to /var/folders/0z/0z+croidGf8Fgea5Eq99D++++TI/-Tmp-/capture5518775197701107502.xml. If you thing the information should be captured, report an bug on http://www.exnebula.org/vcc and send us the file.

Looking at the html source shows the following:

<b>Initiative</b> +10 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Senses</b>

If I take the html for the monster, strip out all of the non-breaking spaces, and then paste it into VCC as a stat block it works fine.

#1

Title:Cannot import monsters /w non-breaking spaces» Cannot import monsters with italic lines in the power description
Assigned to:Anonymous» Nebulorum

I don't think the non-break spaces are to blame. On import they get stripped (prior to loading the XML). Could you attach your modified file? Id like to take a look at it.

On my VCC log I see the following exception:

java.lang.Exception: Failed to process: Block(P#flavor,List(Emphasis(Lion's Bite)))

This is in line with what I taught what the problem. This monster has a sequence of paragraphs with the attacks for each head. VCC currently have no way to handle this, maybe the best way is to be more generic with the blocks between the highlighted line.

#2

You're right, the Chimera has more issues than the nbsp's. There were other monsters I had problems importing with (this was 1.1) but they all import correctly in 1.1.1.

The Chimera also has invalid XHTML (but perfectly valid HTML) as a bunch of paragraphs in the multi-power aren't closed. I closed off the paragraphs to make the XML editor happy and it still wouldn't render in VCC. I then removed the nbsp's from the file as well and it DID render in VCC. Here's what I have for the stat block which renders (reasonably) correctly (see attached).

AttachmentSize
chimera.txt2.97 KB

#3

Version:1.1.1» 1.4-dev
Status:active» patch (code needs review)

Logic to parse sub-comments of a power has changed to become more comprehensive. This means that any number of italic blocks can be added. Their internal representation can still be used for more logic.

Tested with Imp and Chimera, but more test are needed.

#4

Version:1.4-dev» 1.2.0
Status:patch (code needs review)» fixed

Fixed on version 1.2.0.

#5

Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.