Closed hugobuddel closed 4 years ago
@hugobuddel Thank you for this PR.
Not sure whether you should merge it as-is, because it seems rather stupid to add all these characters to ascii_map.rs
. I'm not yet very familiar with rust, and this is how I got it to work so I though I should at least share it.
I'll have to test and review it first.
Note that there seems to have been a regression. The "Other Example" in the online demo contains this blob:
not:line 'quotes'
A || B *bold*
A dash--is not a line
Nor/is this.
which is rendered as
The text seems to indicate that dashes and slashes in text at one point did not become a line. But it could also be a placeholder for future features.
@hugobuddel I think, I'll just have to re-implement the escaping of string back. This project has gone a lot of iteration and overhaul. This latest overhaul removes a lot of the features such as escaping of string with double quotes around. I haven't spend some time on putting it back, as there are a lot of visual bug such as arrows not in the right direction.
There are lot of cases where checking if a character is in between alphanumeric is not enough, as there are also alphanumeric characters used as drawing elements such as v
for arrows and o
for dots.
Thanks for linking to the architecture document. The current architecture does seem rather nice, and the results are amazing I think.
My goal is to move all my ditaa drawings to svgbob, and this was one of the problems I faced. I'll close this PR and just keep running this branch for now. (My main problem with ditaa was that the text position and size is a bit unstable and thus it produces different svg's on different machines.)
The other option was to replace all text in the bob files with identifiers like XXXX167X
and then replace them back with the original text in the SVG files. I might have to do that anyway (because I convert the svg to tikz and replace the text with hyperrefs).
What
Words should be able to contain underscores and dashes.
E.g. these should be rendered as text, not lines:
product_id
,2019-10-31
,+10-15V
. A good test case is the product table in demo.bob.How
This PR achieves this by
ascii_map.rs
and subsequentlyResult
Old product table: New product table:
Improvements in product table:
product_id
and other headersSelected other improvements:
+10-15V
Derived_A
,FS-Cache
,e-mails
,1M-1Watt
There are no negative effects for the examples.
Possible further improvements
(
,)
,/
,:
.ascii_map.rs
.