Comments (2)
@ycp3 @mateusg Thank you for your reports.
I've just found out the root cause: this gem does not support internal links.
I would like to fix this issue but need time.
I seem to be having a similar problem on any docx version bigger than 0.5.0.
0.5.0 and older versions just sanitize the hyperlinks and print the plain text.
Yes, right.
Do you think that printing external links as sanitized text makes sense ?
from docx.
Hi @satoryu.
Any idea what could be happening here? I seem to be having a similar problem on any docx version bigger than 0.5.0.
0.5.0 and older versions just sanitize the hyperlinks and print the plain text.
I'm on Ruby 3.1.4, Ubuntu 20.04.
Backtrace:
undefined method `[]' for nil:NilClass
@document_properties[:hyperlinks][hyperlink_id]
^^^^^^^^^^^^^^
docx-0.6.0/lib/docx/containers/text_run.rb:100:in `href'
docx-0.6.0/lib/docx/containers/text_run.rb:79:in `to_html'
docx-0.6.0/lib/docx/containers/paragraph.rb:48:in `block in to_html'
docx-0.6.0/lib/docx/containers/paragraph.rb:47:in `each'
docx-0.6.0/lib/docx/containers/paragraph.rb:47:in `to_html'
from docx.
Related Issues (20)
- Detect and trim blank page
- ZIP library isn't working as expected in the document.rb
- Replace different placeholder text in each table cell HOT 4
- Text not being inserted after bookmark HOT 4
- Replace placeholders in a paragraph HOT 6
- Order of paragraphs and tables HOT 4
- Can watermark be supported
- to_html only considers some styles and not others HOT 1
- Fuzzer + various crashes
- Request to remove monkeypatching on Module HOT 2
- Please cut a new gem release to include a fix HOT 2
- When a file other than docx is provided, an unexpected error is thrown. HOT 1
- accept docm file
- add revision mark (text) in paragraph text
- RFC: Ability to create a new document file HOT 1
- Text Replacement not working as Expected HOT 6
- How can we add a new line break between a paragraph HOT 6
- How can we add a new paragraph
- How can we add a new table HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docx.