pepijnve / ditaa

A stripped down version of ditaa.
GNU Lesser General Public License v3.0
10 stars 3 forks source link

Remove 'o' as a bullet point pattern #9

Closed georgeraraujo closed 2 years ago

georgeraraujo commented 2 years ago

Hi, Would you consider removing 'o' as a bullet point pattern? 'o' in Portuguese ' is equivalent to the definite article 'the', which results in unintended output:

/-------------------------------------------------------------------------------------\
|Coloque um fio de azeite na frigideira.                                              |
|Se quiser, salpique um pouquinho de farinha de trigo – isso ajuda o ovo a não grudar.|
|Deixe aquecer.                                                                       |
\-------------------------------------------------------------------------------------/
      |
      v
/------------------------------------------\
|Quebre o ovo na frigideira.               |
|Salpique uma pitada de sal por todo o ovo.|
\------------------------------------------/
      |
      v
/----------------------------------------------------------------\
|Mantenha em fogo baixo até a clara estar rendada e a gema, mole.|
|Retire o ovo da frigideira e sirva.                             |
\----------------------------------------------------------------/

como_fritar_ovo

As far as I can tell it would be necessary to change line 817 of src/main/java/org/stathissideris/ditaa/text/TextGrid.java:

https://github.com/pepijnve/ditaa/blob/43102eaa6cb5dab1425cb33c7716cf84702a8bc4/src/main/java/org/stathissideris/ditaa/text/TextGrid.java#L813-L822

Thanks!

pepijnve commented 2 years ago

Seems like a very reasonable request to me. My only concern is that this may break existing ditaa diagrams.

Also note that this fork of ditaa is only used in asciidoctor-diagram as far as I know. Would this change still be useful for you given that limitation?

georgeraraujo commented 2 years ago

I understand your concern about breaking existing diagrams. Should this change be implemented, I think one way of dealing with it would be to include an explanation in the change log stating that users should use * instead of o.

As for the scope of the change being restricted to asciidoctor-diagram, that's EXACTLY my use case :) I also submitted an issue upstream at https://github.com/stathissideris/ditaa/issues/75 but that project seems inactive. That's why I asked here.

pepijnve commented 2 years ago

I think we can retain backwards compatibility and still get you what you need by adding an option. I'm thinking of adding ditaa-bullet-characters or something along those lines. The default would be *o. In your document you could set this to * (or whatever other bullet character you would like to use) to disable the default handling of o. Would that work?

georgeraraujo commented 2 years ago

It sure would!