asciidoc-googledocs-addon
asciidoc-googledocs-addon copied to clipboard
Inline code not converted
I have lots of inline code in my gdoc along styled with consolas font among words with Arial font. Those codes are not converted to adoc syntax.
Hello @hidingmode I believe it should work, could you please share a sample document where inline code are not converted ?
I'm using the following font name to guess if the text is an inline code:
https://github.com/Mogztter/asciidoc-googledocs-addon/blob/67e62eb547a174d889fa651935588d115b1ae360/app/Code.gs#L305-L321
https://docs.google.com/document/d/1S2b2YXZlSWRgvrOO9WluoVK1UfUGHfUu5gXohvI88Ec/edit?usp=sharing
Thanks! Indeed it's not working properly... I will investigate :male_detective:
Previously the API was not able to detect font changes in a paragraph but now it's working. I've updated the code and I will publish a new version soon.
You can review the code: #32
I have tested the new code, but the issue still persists if the code is in the middle of a line:
case: lorem ipsum dolor sit amet
generated adoc: lorem ipsum dolor sit amet
expected adoc: lorem ipsum `dolor sit` amet
Also, some issues with the original example:
case: lorem ipsum dolor sit amet
expected adoc: lorem ipsum `dolor sit amet`
- If i select the text with the end of line char
generated adoc:
lorem ipsum +dolor sit amet+ - but if i select the text without the end of line char
generated adoc:
lorem ipsum dolor sit amet
Thanks for your feedback. As mentioned in my previous comment, it may be a limitation of the App Scripts API... I will investigate further to understand how getTextAttributeIndices is working.