rubyXL 3.4.39 → 3.4.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +107 -14
  3. data/VERSION +1 -1
  4. data/bin/console +10 -0
  5. data/bin/setup +3 -0
  6. data/lib/rubyXL/convenience_methods/cell.rb +6 -3
  7. data/lib/rubyXL/version.rb +3 -0
  8. data/lib/rubyXL.rb +1 -0
  9. data/rubyXL.gemspec +10 -482
  10. metadata +27 -430
  11. data/.circleci/config.yml +0 -71
  12. data/.codeclimate.yml +0 -3
  13. data/.rubocop.yml +0 -124
  14. data/CHANGELOG.md +0 -12
  15. data/Gemfile +0 -23
  16. data/rdoc/README_rdoc.html +0 -871
  17. data/rdoc/RubyXL/AExtension.html +0 -703
  18. data/rdoc/RubyXL/AExtensionStorageArea.html +0 -543
  19. data/rdoc/RubyXL/ActiveX.html +0 -654
  20. data/rdoc/RubyXL/ActiveXBinary.html +0 -560
  21. data/rdoc/RubyXL/AdjustHandleList.html +0 -539
  22. data/rdoc/RubyXL/Alignment.html +0 -539
  23. data/rdoc/RubyXL/AlternateContent.html +0 -543
  24. data/rdoc/RubyXL/AlternateUrls.html +0 -539
  25. data/rdoc/RubyXL/Authors.html +0 -539
  26. data/rdoc/RubyXL/AutoFilter.html +0 -539
  27. data/rdoc/RubyXL/AutoFilterColumn.html +0 -539
  28. data/rdoc/RubyXL/BinaryImageFile.html +0 -568
  29. data/rdoc/RubyXL/BodyProperties.html +0 -539
  30. data/rdoc/RubyXL/BooleanNode.html +0 -543
  31. data/rdoc/RubyXL/BooleanValue.html +0 -543
  32. data/rdoc/RubyXL/Border.html +0 -759
  33. data/rdoc/RubyXL/BorderEdge.html +0 -656
  34. data/rdoc/RubyXL/Borders.html +0 -608
  35. data/rdoc/RubyXL/Break.html +0 -539
  36. data/rdoc/RubyXL/BreakList.html +0 -539
  37. data/rdoc/RubyXL/CT_AdjPoint2D.html +0 -539
  38. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +0 -539
  39. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +0 -539
  40. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +0 -539
  41. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +0 -539
  42. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +0 -539
  43. data/rdoc/RubyXL/CT_Backdrop.html +0 -539
  44. data/rdoc/RubyXL/CT_Bevel.html +0 -539
  45. data/rdoc/RubyXL/CT_BiLevelEffect.html +0 -539
  46. data/rdoc/RubyXL/CT_BlendEffect.html +0 -539
  47. data/rdoc/RubyXL/CT_Blip.html +0 -539
  48. data/rdoc/RubyXL/CT_BlipFillProperties.html +0 -539
  49. data/rdoc/RubyXL/CT_BlurEffect.html +0 -539
  50. data/rdoc/RubyXL/CT_Camera.html +0 -539
  51. data/rdoc/RubyXL/CT_Color.html +0 -539
  52. data/rdoc/RubyXL/CT_ColorChangeEffect.html +0 -539
  53. data/rdoc/RubyXL/CT_ColorMapping.html +0 -539
  54. data/rdoc/RubyXL/CT_ColorScheme.html +0 -539
  55. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +0 -539
  56. data/rdoc/RubyXL/CT_ConnectionSite.html +0 -539
  57. data/rdoc/RubyXL/CT_ConnectionSiteList.html +0 -539
  58. data/rdoc/RubyXL/CT_DashStop.html +0 -539
  59. data/rdoc/RubyXL/CT_DashStopList.html +0 -539
  60. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +0 -539
  61. data/rdoc/RubyXL/CT_DuotoneEffect.html +0 -539
  62. data/rdoc/RubyXL/CT_EffectContainer.html +0 -539
  63. data/rdoc/RubyXL/CT_EffectList.html +0 -539
  64. data/rdoc/RubyXL/CT_EffectReference.html +0 -539
  65. data/rdoc/RubyXL/CT_EffectStyleItem.html +0 -539
  66. data/rdoc/RubyXL/CT_EffectStyleList.html +0 -539
  67. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +0 -539
  68. data/rdoc/RubyXL/CT_FillEffect.html +0 -539
  69. data/rdoc/RubyXL/CT_FillOverlayEffect.html +0 -539
  70. data/rdoc/RubyXL/CT_FillStyleList.html +0 -539
  71. data/rdoc/RubyXL/CT_FlatText.html +0 -539
  72. data/rdoc/RubyXL/CT_FontCollection.html +0 -539
  73. data/rdoc/RubyXL/CT_FontReference.html +0 -539
  74. data/rdoc/RubyXL/CT_GeomGuideList.html +0 -539
  75. data/rdoc/RubyXL/CT_GlowEffect.html +0 -539
  76. data/rdoc/RubyXL/CT_GradientFillProperties.html +0 -539
  77. data/rdoc/RubyXL/CT_GradientStop.html +0 -539
  78. data/rdoc/RubyXL/CT_GradientStopList.html +0 -539
  79. data/rdoc/RubyXL/CT_HSLEffect.html +0 -539
  80. data/rdoc/RubyXL/CT_HslColor.html +0 -539
  81. data/rdoc/RubyXL/CT_Hyperlink.html +0 -539
  82. data/rdoc/RubyXL/CT_InnerShadowEffect.html +0 -539
  83. data/rdoc/RubyXL/CT_LightRig.html +0 -539
  84. data/rdoc/RubyXL/CT_LineEndProperties.html +0 -539
  85. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +0 -539
  86. data/rdoc/RubyXL/CT_LineProperties.html +0 -539
  87. data/rdoc/RubyXL/CT_LineStyleList.html +0 -539
  88. data/rdoc/RubyXL/CT_LinearShadeProperties.html +0 -539
  89. data/rdoc/RubyXL/CT_LuminanceEffect.html +0 -539
  90. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +0 -539
  91. data/rdoc/RubyXL/CT_OuterShadowEffect.html +0 -539
  92. data/rdoc/RubyXL/CT_Path2D.html +0 -539
  93. data/rdoc/RubyXL/CT_Path2DArcTo.html +0 -539
  94. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +0 -539
  95. data/rdoc/RubyXL/CT_Path2DList.html +0 -539
  96. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +0 -539
  97. data/rdoc/RubyXL/CT_Path2DTo.html +0 -539
  98. data/rdoc/RubyXL/CT_PathShadeProperties.html +0 -539
  99. data/rdoc/RubyXL/CT_PatternFillProperties.html +0 -539
  100. data/rdoc/RubyXL/CT_Point3D.html +0 -539
  101. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +0 -539
  102. data/rdoc/RubyXL/CT_PresetColor.html +0 -539
  103. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +0 -539
  104. data/rdoc/RubyXL/CT_PresetShadowEffect.html +0 -539
  105. data/rdoc/RubyXL/CT_PresetTextShape.html +0 -539
  106. data/rdoc/RubyXL/CT_ReflectionEffect.html +0 -539
  107. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +0 -539
  108. data/rdoc/RubyXL/CT_RelativeRect.html +0 -539
  109. data/rdoc/RubyXL/CT_SRgbColor.html +0 -539
  110. data/rdoc/RubyXL/CT_ScRgbColor.html +0 -539
  111. data/rdoc/RubyXL/CT_Scene3D.html +0 -539
  112. data/rdoc/RubyXL/CT_SchemeColor.html +0 -539
  113. data/rdoc/RubyXL/CT_Shape3D.html +0 -539
  114. data/rdoc/RubyXL/CT_ShapeStyle.html +0 -539
  115. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +0 -539
  116. data/rdoc/RubyXL/CT_SphereCoords.html +0 -539
  117. data/rdoc/RubyXL/CT_StretchInfoProperties.html +0 -539
  118. data/rdoc/RubyXL/CT_StyleMatrix.html +0 -539
  119. data/rdoc/RubyXL/CT_StyleMatrixReference.html +0 -539
  120. data/rdoc/RubyXL/CT_SupplementalFont.html +0 -539
  121. data/rdoc/RubyXL/CT_SystemColor.html +0 -539
  122. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +0 -539
  123. data/rdoc/RubyXL/CT_TextBlipBullet.html +0 -539
  124. data/rdoc/RubyXL/CT_TextCharBullet.html +0 -539
  125. data/rdoc/RubyXL/CT_TextCharacterProperties.html +0 -539
  126. data/rdoc/RubyXL/CT_TextFont.html +0 -539
  127. data/rdoc/RubyXL/CT_TextListStyle.html +0 -539
  128. data/rdoc/RubyXL/CT_TextNormalAutofit.html +0 -539
  129. data/rdoc/RubyXL/CT_TextParagraphProperties.html +0 -539
  130. data/rdoc/RubyXL/CT_TextSpacing.html +0 -539
  131. data/rdoc/RubyXL/CT_TextTabStop.html +0 -539
  132. data/rdoc/RubyXL/CT_TextTabStopList.html +0 -539
  133. data/rdoc/RubyXL/CT_TileInfoProperties.html +0 -539
  134. data/rdoc/RubyXL/CT_TintEffect.html +0 -539
  135. data/rdoc/RubyXL/CT_Transform2D.html +0 -539
  136. data/rdoc/RubyXL/CT_TransformEffect.html +0 -539
  137. data/rdoc/RubyXL/CT_Vector3D.html +0 -539
  138. data/rdoc/RubyXL/CT_XYAdjustHandle.html +0 -539
  139. data/rdoc/RubyXL/CalculationChain.html +0 -633
  140. data/rdoc/RubyXL/CalculationChainCell.html +0 -539
  141. data/rdoc/RubyXL/CalculationProperties.html +0 -539
  142. data/rdoc/RubyXL/Cell.html +0 -1315
  143. data/rdoc/RubyXL/CellConvenienceMethods.html +0 -2311
  144. data/rdoc/RubyXL/CellExt.html +0 -539
  145. data/rdoc/RubyXL/CellSmartTag.html +0 -539
  146. data/rdoc/RubyXL/CellSmartTagProperty.html +0 -539
  147. data/rdoc/RubyXL/CellSmartTags.html +0 -539
  148. data/rdoc/RubyXL/CellStyle.html +0 -539
  149. data/rdoc/RubyXL/CellStyleXFs.html +0 -608
  150. data/rdoc/RubyXL/CellStyles.html +0 -608
  151. data/rdoc/RubyXL/CellValue.html +0 -609
  152. data/rdoc/RubyXL/CellWatch.html +0 -539
  153. data/rdoc/RubyXL/CellWatches.html +0 -539
  154. data/rdoc/RubyXL/CellXFs.html +0 -609
  155. data/rdoc/RubyXL/ChartColorsFile.html +0 -568
  156. data/rdoc/RubyXL/ChartFile.html +0 -664
  157. data/rdoc/RubyXL/ChartStyleFile.html +0 -568
  158. data/rdoc/RubyXL/ChartUserShapesFile.html +0 -568
  159. data/rdoc/RubyXL/Chartsheet.html +0 -743
  160. data/rdoc/RubyXL/ChartsheetPageSetup.html +0 -539
  161. data/rdoc/RubyXL/ChartsheetProperties.html +0 -539
  162. data/rdoc/RubyXL/ChartsheetProtection.html +0 -539
  163. data/rdoc/RubyXL/ChartsheetView.html +0 -539
  164. data/rdoc/RubyXL/ChartsheetViews.html +0 -539
  165. data/rdoc/RubyXL/Color.html +0 -629
  166. data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +0 -774
  167. data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +0 -845
  168. data/rdoc/RubyXL/ColorConvenienceClasses.html +0 -528
  169. data/rdoc/RubyXL/ColorConvenienceMethods.html +0 -606
  170. data/rdoc/RubyXL/ColorFilter.html +0 -539
  171. data/rdoc/RubyXL/ColorScale.html +0 -539
  172. data/rdoc/RubyXL/ColorSet.html +0 -539
  173. data/rdoc/RubyXL/Colors.html +0 -539
  174. data/rdoc/RubyXL/ColumnRange.html +0 -786
  175. data/rdoc/RubyXL/ColumnRanges.html +0 -773
  176. data/rdoc/RubyXL/Comment.html +0 -539
  177. data/rdoc/RubyXL/CommentList.html +0 -539
  178. data/rdoc/RubyXL/CommentsFile.html +0 -657
  179. data/rdoc/RubyXL/ConditionalFormatValue.html +0 -539
  180. data/rdoc/RubyXL/ConditionalFormatting.html +0 -539
  181. data/rdoc/RubyXL/ConditionalFormattingRule.html +0 -539
  182. data/rdoc/RubyXL/Connection.html +0 -539
  183. data/rdoc/RubyXL/ConnectionTable.html +0 -539
  184. data/rdoc/RubyXL/ConnectionTables.html +0 -539
  185. data/rdoc/RubyXL/ConnectionTextField.html +0 -539
  186. data/rdoc/RubyXL/ConnectionTextFields.html +0 -539
  187. data/rdoc/RubyXL/Connections.html +0 -633
  188. data/rdoc/RubyXL/ContentTypeDefault.html +0 -543
  189. data/rdoc/RubyXL/ContentTypeOverride.html +0 -543
  190. data/rdoc/RubyXL/ContentTypes.html +0 -721
  191. data/rdoc/RubyXL/ControlPropertiesFile.html +0 -568
  192. data/rdoc/RubyXL/CorePropertiesFile.html +0 -1013
  193. data/rdoc/RubyXL/CustomColor.html +0 -539
  194. data/rdoc/RubyXL/CustomColorList.html +0 -539
  195. data/rdoc/RubyXL/CustomFilter.html +0 -539
  196. data/rdoc/RubyXL/CustomFilters.html +0 -539
  197. data/rdoc/RubyXL/CustomGeometry.html +0 -539
  198. data/rdoc/RubyXL/CustomProperties.html +0 -539
  199. data/rdoc/RubyXL/CustomPropertiesFile.html +0 -568
  200. data/rdoc/RubyXL/CustomProperty.html +0 -539
  201. data/rdoc/RubyXL/CustomPropertyFile.html +0 -568
  202. data/rdoc/RubyXL/CustomSheetView.html +0 -539
  203. data/rdoc/RubyXL/CustomSheetViews.html +0 -539
  204. data/rdoc/RubyXL/CustomWorkbookView.html +0 -539
  205. data/rdoc/RubyXL/CustomWorkbookViews.html +0 -539
  206. data/rdoc/RubyXL/CustomXMLFile.html +0 -560
  207. data/rdoc/RubyXL/DXF.html +0 -539
  208. data/rdoc/RubyXL/DXFs.html +0 -539
  209. data/rdoc/RubyXL/DataBar.html +0 -539
  210. data/rdoc/RubyXL/DataConsolidate.html +0 -539
  211. data/rdoc/RubyXL/DataConsolidationReference.html +0 -539
  212. data/rdoc/RubyXL/DataConsolidationReferences.html +0 -539
  213. data/rdoc/RubyXL/DataType.html +0 -589
  214. data/rdoc/RubyXL/DataValidation.html +0 -539
  215. data/rdoc/RubyXL/DataValidations.html +0 -539
  216. data/rdoc/RubyXL/DateGroupItem.html +0 -539
  217. data/rdoc/RubyXL/DefinedName.html +0 -539
  218. data/rdoc/RubyXL/DefinedNameExt.html +0 -539
  219. data/rdoc/RubyXL/DefinedNames.html +0 -616
  220. data/rdoc/RubyXL/DefinedNamesExt.html +0 -539
  221. data/rdoc/RubyXL/DocumentPropertiesFile.html +0 -725
  222. data/rdoc/RubyXL/DrawingFile.html +0 -663
  223. data/rdoc/RubyXL/DynamicFilter.html +0 -539
  224. data/rdoc/RubyXL/EmbeddedControl.html +0 -539
  225. data/rdoc/RubyXL/EmbeddedControls.html +0 -539
  226. data/rdoc/RubyXL/Extension.html +0 -539
  227. data/rdoc/RubyXL/ExtensionStorageArea.html +0 -539
  228. data/rdoc/RubyXL/Extents.html +0 -539
  229. data/rdoc/RubyXL/ExternalBook.html +0 -539
  230. data/rdoc/RubyXL/ExternalLinksFile.html +0 -659
  231. data/rdoc/RubyXL/ExternalReference.html +0 -539
  232. data/rdoc/RubyXL/ExternalReferences.html +0 -539
  233. data/rdoc/RubyXL/ExtraColorSchemeList.html +0 -539
  234. data/rdoc/RubyXL/FieldItem.html +0 -539
  235. data/rdoc/RubyXL/FileRecoveryProperties.html +0 -539
  236. data/rdoc/RubyXL/FileSharing.html +0 -539
  237. data/rdoc/RubyXL/FileVersion.html +0 -539
  238. data/rdoc/RubyXL/Fill.html +0 -608
  239. data/rdoc/RubyXL/Fills.html +0 -608
  240. data/rdoc/RubyXL/FilterContainer.html +0 -539
  241. data/rdoc/RubyXL/FloatNode.html +0 -543
  242. data/rdoc/RubyXL/FloatValue.html +0 -543
  243. data/rdoc/RubyXL/Font.html +0 -626
  244. data/rdoc/RubyXL/FontConvenienceMethods.html +0 -1169
  245. data/rdoc/RubyXL/FontScheme.html +0 -539
  246. data/rdoc/RubyXL/Fonts.html +0 -608
  247. data/rdoc/RubyXL/Formula.html +0 -539
  248. data/rdoc/RubyXL/FunctionGroup.html +0 -539
  249. data/rdoc/RubyXL/FunctionGroups.html +0 -539
  250. data/rdoc/RubyXL/GenericStorageObject.html +0 -803
  251. data/rdoc/RubyXL/GradientFill.html +0 -539
  252. data/rdoc/RubyXL/HeaderFooterSettings.html +0 -539
  253. data/rdoc/RubyXL/Hyperlink.html +0 -539
  254. data/rdoc/RubyXL/HyperlinkRelFile.html +0 -560
  255. data/rdoc/RubyXL/Hyperlinks.html +0 -539
  256. data/rdoc/RubyXL/IconFilter.html +0 -539
  257. data/rdoc/RubyXL/IconSet.html +0 -539
  258. data/rdoc/RubyXL/IgnoredError.html +0 -539
  259. data/rdoc/RubyXL/IgnoredErrors.html +0 -539
  260. data/rdoc/RubyXL/IndexedColors.html +0 -539
  261. data/rdoc/RubyXL/InputCells.html +0 -539
  262. data/rdoc/RubyXL/IntegerNode.html +0 -543
  263. data/rdoc/RubyXL/IntegerValue.html +0 -543
  264. data/rdoc/RubyXL/LegacyCell.html +0 -597
  265. data/rdoc/RubyXL/LegacyWorksheet.html +0 -760
  266. data/rdoc/RubyXL/MRUColors.html +0 -539
  267. data/rdoc/RubyXL/MacrosFile.html +0 -568
  268. data/rdoc/RubyXL/MergedCell.html +0 -539
  269. data/rdoc/RubyXL/MergedCells.html +0 -539
  270. data/rdoc/RubyXL/NumFmt.html +0 -539
  271. data/rdoc/RubyXL/NumberFormat.html +0 -609
  272. data/rdoc/RubyXL/NumberFormats.html +0 -625
  273. data/rdoc/RubyXL/OLEObject.html +0 -539
  274. data/rdoc/RubyXL/OLEObjectFile.html +0 -568
  275. data/rdoc/RubyXL/OLEObjects.html +0 -539
  276. data/rdoc/RubyXL/OLESize.html +0 -539
  277. data/rdoc/RubyXL/OOXMLContainerObject.html +0 -909
  278. data/rdoc/RubyXL/OOXMLIgnored.html +0 -681
  279. data/rdoc/RubyXL/OOXMLObject.html +0 -561
  280. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +0 -1034
  281. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +0 -1091
  282. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +0 -1174
  283. data/rdoc/RubyXL/OOXMLTopLevelObject.html +0 -891
  284. data/rdoc/RubyXL/OdbcOleDbProperties.html +0 -539
  285. data/rdoc/RubyXL/Offset.html +0 -539
  286. data/rdoc/RubyXL/OlapProperties.html +0 -539
  287. data/rdoc/RubyXL/OleItem.html +0 -539
  288. data/rdoc/RubyXL/OleItems.html +0 -539
  289. data/rdoc/RubyXL/OleLink.html +0 -539
  290. data/rdoc/RubyXL/OutlineProperties.html +0 -539
  291. data/rdoc/RubyXL/PageMargins.html +0 -539
  292. data/rdoc/RubyXL/PageSetup.html +0 -539
  293. data/rdoc/RubyXL/PageSetupProperties.html +0 -539
  294. data/rdoc/RubyXL/Pane.html +0 -539
  295. data/rdoc/RubyXL/Parser.html +0 -670
  296. data/rdoc/RubyXL/PatternFill.html +0 -539
  297. data/rdoc/RubyXL/PersonMetadata.html +0 -568
  298. data/rdoc/RubyXL/PhoneticProperties.html +0 -539
  299. data/rdoc/RubyXL/PhoneticRun.html +0 -539
  300. data/rdoc/RubyXL/PivotArea.html +0 -539
  301. data/rdoc/RubyXL/PivotCache.html +0 -539
  302. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +0 -590
  303. data/rdoc/RubyXL/PivotCacheRecordsFile.html +0 -568
  304. data/rdoc/RubyXL/PivotCaches.html +0 -539
  305. data/rdoc/RubyXL/PivotReference.html +0 -539
  306. data/rdoc/RubyXL/PivotReferences.html +0 -539
  307. data/rdoc/RubyXL/PivotSelection.html +0 -539
  308. data/rdoc/RubyXL/PivotTableFile.html +0 -590
  309. data/rdoc/RubyXL/PresetGeometry.html +0 -539
  310. data/rdoc/RubyXL/PrintOptions.html +0 -539
  311. data/rdoc/RubyXL/PrinterSettingsFile.html +0 -568
  312. data/rdoc/RubyXL/ProtectedRange.html +0 -539
  313. data/rdoc/RubyXL/ProtectedRanges.html +0 -539
  314. data/rdoc/RubyXL/Protection.html +0 -539
  315. data/rdoc/RubyXL/QueryParameter.html +0 -539
  316. data/rdoc/RubyXL/QueryParameters.html +0 -539
  317. data/rdoc/RubyXL/QueryTable.html +0 -655
  318. data/rdoc/RubyXL/QueryTableDeletedField.html +0 -539
  319. data/rdoc/RubyXL/QueryTableDeletedFields.html +0 -539
  320. data/rdoc/RubyXL/QueryTableField.html +0 -539
  321. data/rdoc/RubyXL/QueryTableFields.html +0 -539
  322. data/rdoc/RubyXL/QueryTableRefresh.html +0 -539
  323. data/rdoc/RubyXL/RID.html +0 -543
  324. data/rdoc/RubyXL/RawOOXML.html +0 -703
  325. data/rdoc/RubyXL/Reference.html +0 -1332
  326. data/rdoc/RubyXL/Relationship.html +0 -543
  327. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +0 -604
  328. data/rdoc/RubyXL/RelationshipSupport.html +0 -943
  329. data/rdoc/RubyXL/RevisionPointer.html +0 -539
  330. data/rdoc/RubyXL/RichText.html +0 -611
  331. data/rdoc/RubyXL/RichTextRun.html +0 -608
  332. data/rdoc/RubyXL/Row.html +0 -1003
  333. data/rdoc/RubyXL/RowExt.html +0 -539
  334. data/rdoc/RubyXL/RunProperties.html +0 -539
  335. data/rdoc/RubyXL/Scenario.html +0 -539
  336. data/rdoc/RubyXL/Scenarios.html +0 -539
  337. data/rdoc/RubyXL/Selection.html +0 -616
  338. data/rdoc/RubyXL/ShapeGuide.html +0 -539
  339. data/rdoc/RubyXL/ShapeTextRectangle.html +0 -539
  340. data/rdoc/RubyXL/SharedStringsTable.html +0 -952
  341. data/rdoc/RubyXL/Sheet.html +0 -539
  342. data/rdoc/RubyXL/SheetCalculationProperties.html +0 -539
  343. data/rdoc/RubyXL/SheetData.html +0 -652
  344. data/rdoc/RubyXL/SheetDataExt.html +0 -539
  345. data/rdoc/RubyXL/SheetDataSet.html +0 -539
  346. data/rdoc/RubyXL/SheetMetadata.html +0 -568
  347. data/rdoc/RubyXL/SheetName.html +0 -539
  348. data/rdoc/RubyXL/SheetNames.html +0 -539
  349. data/rdoc/RubyXL/Sheets.html +0 -539
  350. data/rdoc/RubyXL/SlicerCacheFile.html +0 -568
  351. data/rdoc/RubyXL/SlicerFile.html +0 -568
  352. data/rdoc/RubyXL/SmartTagProperties.html +0 -539
  353. data/rdoc/RubyXL/SmartTagType.html +0 -539
  354. data/rdoc/RubyXL/SmartTagTypes.html +0 -539
  355. data/rdoc/RubyXL/SmartTags.html +0 -539
  356. data/rdoc/RubyXL/SortCondition.html +0 -539
  357. data/rdoc/RubyXL/SortState.html +0 -539
  358. data/rdoc/RubyXL/Sqref.html +0 -681
  359. data/rdoc/RubyXL/Stop.html +0 -539
  360. data/rdoc/RubyXL/StringNode.html +0 -543
  361. data/rdoc/RubyXL/StringNodeW3C.html +0 -681
  362. data/rdoc/RubyXL/StringValue.html +0 -543
  363. data/rdoc/RubyXL/Stylesheet.html +0 -864
  364. data/rdoc/RubyXL/TableFile.html +0 -568
  365. data/rdoc/RubyXL/TableParts.html +0 -543
  366. data/rdoc/RubyXL/TableStyle.html +0 -539
  367. data/rdoc/RubyXL/TableStyles.html +0 -539
  368. data/rdoc/RubyXL/Text.html +0 -679
  369. data/rdoc/RubyXL/TextImportSettings.html +0 -539
  370. data/rdoc/RubyXL/Theme.html +0 -1077
  371. data/rdoc/RubyXL/ThemeElements.html +0 -539
  372. data/rdoc/RubyXL/ThumbnailFile.html +0 -568
  373. data/rdoc/RubyXL/Top10.html +0 -539
  374. data/rdoc/RubyXL/VMLDrawingFile.html +0 -590
  375. data/rdoc/RubyXL/Variant.html +0 -539
  376. data/rdoc/RubyXL/Vector.html +0 -612
  377. data/rdoc/RubyXL/VectorValue.html +0 -543
  378. data/rdoc/RubyXL/VisualProperties.html +0 -539
  379. data/rdoc/RubyXL/WebPublishObject.html +0 -539
  380. data/rdoc/RubyXL/WebPublishObjects.html +0 -539
  381. data/rdoc/RubyXL/WebPublishingItem.html +0 -539
  382. data/rdoc/RubyXL/WebPublishingItems.html +0 -539
  383. data/rdoc/RubyXL/WebPublishingProperties.html +0 -539
  384. data/rdoc/RubyXL/WebQueryProperties.html +0 -539
  385. data/rdoc/RubyXL/Workbook.html +0 -2085
  386. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +0 -1407
  387. data/rdoc/RubyXL/WorkbookProperties.html +0 -539
  388. data/rdoc/RubyXL/WorkbookProtection.html +0 -539
  389. data/rdoc/RubyXL/WorkbookRoot.html +0 -940
  390. data/rdoc/RubyXL/WorkbookView.html +0 -539
  391. data/rdoc/RubyXL/WorkbookViews.html +0 -539
  392. data/rdoc/RubyXL/Worksheet.html +0 -1224
  393. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +0 -4087
  394. data/rdoc/RubyXL/WorksheetDimensions.html +0 -539
  395. data/rdoc/RubyXL/WorksheetFormatProperties.html +0 -543
  396. data/rdoc/RubyXL/WorksheetProperties.html +0 -539
  397. data/rdoc/RubyXL/WorksheetProtection.html +0 -539
  398. data/rdoc/RubyXL/WorksheetView.html +0 -539
  399. data/rdoc/RubyXL/WorksheetViews.html +0 -539
  400. data/rdoc/RubyXL/XF.html +0 -539
  401. data/rdoc/RubyXL.html +0 -1381
  402. data/rdoc/created.rid +0 -45
  403. data/rdoc/css/rdoc.css +0 -1955
  404. data/rdoc/index.html +0 -455
  405. data/rdoc/js/aliki.js +0 -511
  406. data/rdoc/js/bash_highlighter.js +0 -167
  407. data/rdoc/js/c_highlighter.js +0 -299
  408. data/rdoc/js/search_controller.js +0 -129
  409. data/rdoc/js/search_data.js +0 -1
  410. data/rdoc/js/search_navigation.js +0 -105
  411. data/rdoc/js/search_ranker.js +0 -239
  412. data/rdoc/js/theme-toggle.js +0 -112
  413. data/spec/lib/cell_spec.rb +0 -694
  414. data/spec/lib/color_spec.rb +0 -21
  415. data/spec/lib/parser_spec.rb +0 -118
  416. data/spec/lib/reference_spec.rb +0 -122
  417. data/spec/lib/rgb_color_spec.rb +0 -29
  418. data/spec/lib/stylesheet_spec.rb +0 -27
  419. data/spec/lib/text_spec.rb +0 -27
  420. data/spec/lib/workbook_root_spec.rb +0 -43
  421. data/spec/lib/workbook_spec.rb +0 -197
  422. data/spec/lib/worksheet_spec.rb +0 -1777
  423. data/spec/spec_helper.rb +0 -13
  424. data/test/input/.gitkeep +0 -0
  425. data/test/output/.gitkeep +0 -0
  426. data/test/test_parse_write.rb +0 -15
  427. data/tmp/.gitignore +0 -1
data/rdoc/js/aliki.js DELETED
@@ -1,511 +0,0 @@
1
- 'use strict';
2
-
3
- /* ===== Method Source Code Toggling ===== */
4
-
5
- function showSource(e) {
6
- let target = e.target;
7
- while (!target.classList.contains('method-detail')) {
8
- target = target.parentNode;
9
- }
10
- if (typeof target !== "undefined" && target !== null) {
11
- target = target.querySelector('.method-source-code');
12
- }
13
- if (typeof target !== "undefined" && target !== null) {
14
- target.classList.toggle('active-menu')
15
- }
16
- }
17
-
18
- function hookSourceViews() {
19
- document.querySelectorAll('.method-source-toggle').forEach((codeObject) => {
20
- codeObject.addEventListener('click', showSource);
21
- });
22
- }
23
-
24
- /* ===== Search Functionality ===== */
25
-
26
- function createSearchInstance(input, result) {
27
- if (!input || !result) return null;
28
-
29
- result.classList.remove("initially-hidden");
30
-
31
- const search = new SearchController(search_data, input, result);
32
-
33
- search.renderItem = function(result) {
34
- const li = document.createElement('li');
35
- let html = '';
36
-
37
- // TODO add relative path to <script> per-page
38
- html += `<p class="search-match"><a href="${index_rel_prefix}${this.escapeHTML(result.path)}">${this.hlt(result.title)}`;
39
- if (result.params)
40
- html += `<span class="params">${result.params}</span>`;
41
- html += '</a>';
42
-
43
- // Add type indicator
44
- if (result.type) {
45
- const typeLabel = this.formatType(result.type);
46
- const typeClass = result.type.replace(/_/g, '-');
47
- html += `<span class="search-type search-type-${this.escapeHTML(typeClass)}">${typeLabel}</span>`;
48
- }
49
-
50
- if (result.snippet)
51
- html += `<div class="search-snippet">${result.snippet}</div>`;
52
-
53
- li.innerHTML = html;
54
-
55
- return li;
56
- }
57
-
58
- search.formatType = function(type) {
59
- const typeLabels = {
60
- 'class': 'class',
61
- 'module': 'module',
62
- 'constant': 'const',
63
- 'instance_method': 'method',
64
- 'class_method': 'method'
65
- };
66
- return typeLabels[type] || type;
67
- }
68
-
69
- search.select = function(result) {
70
- window.location.href = result.firstChild.firstChild.href;
71
- }
72
-
73
- return search;
74
- }
75
-
76
- function hookSearch() {
77
- const input = document.querySelector('#search-field');
78
- const result = document.querySelector('#search-results-desktop');
79
-
80
- if (!input || !result) return; // Exit if search elements not found
81
-
82
- const search_section = document.querySelector('#search-section');
83
- if (search_section) {
84
- search_section.classList.remove("initially-hidden");
85
- }
86
-
87
- const search = createSearchInstance(input, result);
88
- if (!search) return;
89
-
90
- // Hide search results when clicking outside the search area
91
- document.addEventListener('click', (e) => {
92
- if (!e.target.closest('.navbar-search-desktop')) {
93
- search.hide();
94
- }
95
- });
96
-
97
- // Hide search results on Escape key on desktop too
98
- document.addEventListener('keydown', (e) => {
99
- if (e.key === 'Escape' && input.matches(":focus")) {
100
- search.hide();
101
- input.blur();
102
- }
103
- });
104
-
105
- // Show search results when focusing on input (if there's a query)
106
- input.addEventListener('focus', () => {
107
- if (input.value.trim()) {
108
- search.show();
109
- }
110
- });
111
-
112
- // Check for ?q= URL parameter and trigger search automatically
113
- if (typeof URLSearchParams !== 'undefined') {
114
- const urlParams = new URLSearchParams(window.location.search);
115
- const queryParam = urlParams.get('q');
116
- if (queryParam) {
117
- input.value = queryParam;
118
- search.search(queryParam, false);
119
- }
120
- }
121
- }
122
-
123
- /* ===== Keyboard Shortcuts ===== */
124
-
125
- function hookFocus() {
126
- document.addEventListener("keydown", (event) => {
127
- if (document.activeElement.tagName === 'INPUT') {
128
- return;
129
- }
130
- if (event.key === "/") {
131
- event.preventDefault();
132
- document.querySelector('#search-field').focus();
133
- }
134
- });
135
- }
136
-
137
- /* ===== Mobile Navigation ===== */
138
-
139
- function hookSidebar() {
140
- const navigation = document.querySelector('#navigation');
141
- const navigationToggle = document.querySelector('#navigation-toggle');
142
-
143
- if (!navigation || !navigationToggle) return;
144
-
145
- const closeNav = () => {
146
- navigation.hidden = true;
147
- navigationToggle.ariaExpanded = 'false';
148
- document.body.classList.remove('nav-open');
149
- };
150
-
151
- const openNav = () => {
152
- navigation.hidden = false;
153
- navigationToggle.ariaExpanded = 'true';
154
- document.body.classList.add('nav-open');
155
- };
156
-
157
- const toggleNav = () => {
158
- if (navigation.hidden) {
159
- openNav();
160
- } else {
161
- closeNav();
162
- }
163
- };
164
-
165
- navigationToggle.addEventListener('click', (e) => {
166
- e.stopPropagation();
167
- toggleNav();
168
- });
169
-
170
- const isSmallViewport = window.matchMedia("(max-width: 1023px)").matches;
171
-
172
- // The sidebar is hidden by default with the `hidden` attribute
173
- // On large viewports, we display the sidebar with JavaScript
174
- // This is better than the opposite approach of hiding it with JavaScript
175
- // because it avoids flickering the sidebar when the page is loaded, especially on mobile devices
176
- if (isSmallViewport) {
177
- // Close nav when clicking links inside it
178
- document.addEventListener('click', (e) => {
179
- if (e.target.closest('#navigation a')) {
180
- closeNav();
181
- }
182
- });
183
-
184
- // Close nav when clicking backdrop
185
- document.addEventListener('click', (e) => {
186
- if (!navigation.hidden &&
187
- !e.target.closest('#navigation') &&
188
- !e.target.closest('#navigation-toggle')) {
189
- closeNav();
190
- }
191
- });
192
- } else {
193
- openNav();
194
- }
195
- }
196
-
197
- /* ===== Right Sidebar Table of Contents ===== */
198
-
199
- function generateToc() {
200
- const tocNav = document.querySelector('#toc-nav');
201
- if (!tocNav) return; // Exit if TOC nav doesn't exist
202
-
203
- const main = document.querySelector('main');
204
- if (!main) return;
205
-
206
- // Find all h2 and h3 headings in the main content
207
- const headings = main.querySelectorAll('h1, h2, h3');
208
- if (headings.length === 0) return;
209
-
210
- const tocList = document.createElement('ul');
211
- tocList.className = 'toc-list';
212
-
213
- headings.forEach((heading) => {
214
- // Skip if heading doesn't have an id
215
- if (!heading.id) return;
216
-
217
- const li = document.createElement('li');
218
- const level = heading.tagName.toLowerCase();
219
- li.className = `toc-item toc-${level}`;
220
-
221
- const link = document.createElement('a');
222
- link.href = `#${heading.id}`;
223
- link.className = 'toc-link';
224
- link.textContent = heading.textContent.trim();
225
- link.setAttribute('data-target', heading.id);
226
-
227
- li.appendChild(link);
228
- setHeadingScrollHandler(heading, link);
229
- tocList.appendChild(li);
230
- });
231
-
232
- if (tocList.children.length > 0) {
233
- tocNav.appendChild(tocList);
234
- } else {
235
- // Hide TOC if no headings found
236
- const tocContainer = document.querySelector('.table-of-contents');
237
- if (tocContainer) {
238
- tocContainer.style.display = 'none';
239
- }
240
- }
241
- }
242
-
243
- function hookTocActiveHighlighting() {
244
- const tocLinks = document.querySelectorAll('.toc-link');
245
- const targetHeadings = [];
246
- tocLinks.forEach((link) => {
247
- const targetId = link.getAttribute('data-target');
248
- const heading = document.getElementById(targetId);
249
- if (heading) {
250
- targetHeadings.push(heading);
251
- }
252
- });
253
-
254
- if (targetHeadings.length === 0) return;
255
-
256
- const observerOptions = {
257
- root: null,
258
- rootMargin: '0% 0px -35% 0px',
259
- threshold: 0
260
- };
261
-
262
- const intersectingHeadings = new Set();
263
- const update = () => {
264
- const firstIntersectingHeading = targetHeadings.find((heading) => {
265
- return intersectingHeadings.has(heading);
266
- });
267
- if (!firstIntersectingHeading) return;
268
- const correspondingLink = document.querySelector(`.toc-link[data-target="${firstIntersectingHeading.id}"]`);
269
- if (!correspondingLink) return;
270
-
271
- // Remove active class from all links
272
- tocLinks.forEach((link) => {
273
- link.classList.remove('active');
274
- });
275
-
276
- // Add active class to current link
277
- correspondingLink.classList.add('active');
278
-
279
- // Scroll link into view if needed
280
- const tocNav = document.querySelector('#toc-nav');
281
- if (tocNav) {
282
- const linkRect = correspondingLink.getBoundingClientRect();
283
- const navRect = tocNav.getBoundingClientRect();
284
-
285
- if (linkRect.top < navRect.top || linkRect.bottom > navRect.bottom) {
286
- correspondingLink.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
287
- }
288
- }
289
- };
290
- const observer = new IntersectionObserver((entries) => {
291
- entries.forEach((entry) => {
292
- if (entry.isIntersecting) {
293
- intersectingHeadings.add(entry.target);
294
- } else {
295
- intersectingHeadings.delete(entry.target);
296
- }
297
- });
298
- update();
299
- }, observerOptions);
300
-
301
- // Observe all headings that have corresponding TOC links
302
- targetHeadings.forEach((heading) => {
303
- observer.observe(heading);
304
- });
305
- }
306
-
307
- function setHeadingScrollHandler(heading, link) {
308
- // Smooth scroll to heading when clicking link
309
- if (!heading.id) return;
310
-
311
- link.addEventListener('click', (e) => {
312
- e.preventDefault();
313
- heading.scrollIntoView({ behavior: 'smooth', block: 'start' });
314
- history.pushState(null, '', `#${heading.id}`);
315
- });
316
- }
317
-
318
- function setHeadingSelfLinkScrollHandlers() {
319
- // Clicking link inside heading scrolls smoothly to heading itself
320
- const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
321
- headings.forEach((heading) => {
322
- if (!heading.id) return;
323
-
324
- const link = heading.querySelector(`a[href^="#${heading.id}"]`);
325
- if (link) setHeadingScrollHandler(heading, link);
326
- })
327
- }
328
-
329
- /* ===== Mobile Search Modal ===== */
330
-
331
- function hookSearchModal() {
332
- const searchToggle = document.querySelector('#search-toggle');
333
- const searchModal = document.querySelector('#search-modal');
334
- const searchModalClose = document.querySelector('#search-modal-close');
335
- const searchModalBackdrop = document.querySelector('.search-modal-backdrop');
336
- const searchInput = document.querySelector('#search-field-mobile');
337
- const searchResults = document.querySelector('#search-results-mobile');
338
- const searchEmpty = document.querySelector('.search-modal-empty');
339
-
340
- if (!searchToggle || !searchModal) return;
341
-
342
- // Initialize search for mobile modal
343
- const mobileSearch = createSearchInstance(searchInput, searchResults);
344
- if (!mobileSearch) return;
345
-
346
- // Hide empty state when there are results
347
- const originalRenderItem = mobileSearch.renderItem;
348
- mobileSearch.renderItem = function(result) {
349
- if (searchEmpty) searchEmpty.style.display = 'none';
350
- return originalRenderItem.call(this, result);
351
- };
352
-
353
- const openSearchModal = () => {
354
- searchModal.hidden = false;
355
- document.body.style.overflow = 'hidden';
356
- // Focus input after animation
357
- setTimeout(() => {
358
- if (searchInput) searchInput.focus();
359
- }, 100);
360
- };
361
-
362
- const closeSearchModal = () => {
363
- searchModal.hidden = true;
364
- document.body.style.overflow = '';
365
- };
366
-
367
- // Open on button click
368
- searchToggle.addEventListener('click', openSearchModal);
369
-
370
- // Close on close button click
371
- if (searchModalClose) {
372
- searchModalClose.addEventListener('click', closeSearchModal);
373
- }
374
-
375
- // Close on backdrop click
376
- if (searchModalBackdrop) {
377
- searchModalBackdrop.addEventListener('click', closeSearchModal);
378
- }
379
-
380
- // Close on Escape key
381
- document.addEventListener('keydown', (e) => {
382
- if (e.key === 'Escape' && !searchModal.hidden) {
383
- closeSearchModal();
384
- }
385
- });
386
-
387
- // Check for ?q= URL parameter on mobile and open modal
388
- if (typeof URLSearchParams !== 'undefined') {
389
- const urlParams = new URLSearchParams(window.location.search);
390
- const queryParam = urlParams.get('q');
391
- const isSmallViewport = window.matchMedia("(max-width: 1023px)").matches;
392
-
393
- if (queryParam && isSmallViewport) {
394
- openSearchModal();
395
- searchInput.value = queryParam;
396
- mobileSearch.search(queryParam, false);
397
- }
398
- }
399
- }
400
-
401
- /* ===== Code Block Copy Functionality ===== */
402
-
403
- function createCopyButton() {
404
- const button = document.createElement('button');
405
- button.className = 'copy-code-button';
406
- button.type = 'button';
407
- button.setAttribute('aria-label', 'Copy code to clipboard');
408
- button.setAttribute('title', 'Copy code');
409
-
410
- // Create clipboard icon SVG
411
- const clipboardIcon = `
412
- <svg viewBox="0 0 24 24">
413
- <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
414
- <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
415
- </svg>
416
- `;
417
-
418
- // Create checkmark icon SVG (for copied state)
419
- const checkIcon = `
420
- <svg viewBox="0 0 24 24">
421
- <polyline points="20 6 9 17 4 12"></polyline>
422
- </svg>
423
- `;
424
-
425
- button.innerHTML = clipboardIcon;
426
- button.dataset.clipboardIcon = clipboardIcon;
427
- button.dataset.checkIcon = checkIcon;
428
-
429
- return button;
430
- }
431
-
432
- function wrapCodeBlocksWithCopyButton() {
433
- // Copy buttons are generated dynamically rather than statically in rhtml templates because:
434
- // - Code blocks are generated by RDoc's markup formatter (RDoc::Markup::ToHtml),
435
- // not directly in rhtml templates
436
- // - Modifying the formatter would require extending RDoc's core internals
437
-
438
- // Find all pre elements that are not already wrapped
439
- const preElements = document.querySelectorAll('main pre:not(.code-block-wrapper pre)');
440
-
441
- preElements.forEach((pre) => {
442
- // Skip if already wrapped
443
- if (pre.parentElement.classList.contains('code-block-wrapper')) {
444
- return;
445
- }
446
-
447
- // Create wrapper
448
- const wrapper = document.createElement('div');
449
- wrapper.className = 'code-block-wrapper';
450
-
451
- // Insert wrapper before pre
452
- pre.parentNode.insertBefore(wrapper, pre);
453
-
454
- // Move pre into wrapper
455
- wrapper.appendChild(pre);
456
-
457
- // Create and add copy button
458
- const copyButton = createCopyButton();
459
- wrapper.appendChild(copyButton);
460
-
461
- // Add click handler
462
- copyButton.addEventListener('click', () => {
463
- copyCodeToClipboard(pre, copyButton);
464
- });
465
- });
466
- }
467
-
468
- function copyCodeToClipboard(preElement, button) {
469
- const code = preElement.textContent;
470
-
471
- // Use the Clipboard API (supported by all modern browsers)
472
- if (navigator.clipboard && navigator.clipboard.writeText) {
473
- navigator.clipboard.writeText(code).then(() => {
474
- showCopySuccess(button);
475
- }).catch(() => {
476
- alert('Failed to copy code.');
477
- });
478
- } else {
479
- alert('Failed to copy code.');
480
- }
481
- }
482
-
483
- function showCopySuccess(button) {
484
- // Change icon to checkmark
485
- button.innerHTML = button.dataset.checkIcon;
486
- button.classList.add('copied');
487
- button.setAttribute('aria-label', 'Copied!');
488
- button.setAttribute('title', 'Copied!');
489
-
490
- // Revert back after 2 seconds
491
- setTimeout(() => {
492
- button.innerHTML = button.dataset.clipboardIcon;
493
- button.classList.remove('copied');
494
- button.setAttribute('aria-label', 'Copy code to clipboard');
495
- button.setAttribute('title', 'Copy code');
496
- }, 2000);
497
- }
498
-
499
- /* ===== Initialization ===== */
500
-
501
- document.addEventListener('DOMContentLoaded', () => {
502
- hookSourceViews();
503
- hookSearch();
504
- hookFocus();
505
- hookSidebar();
506
- generateToc();
507
- setHeadingSelfLinkScrollHandlers();
508
- hookTocActiveHighlighting();
509
- hookSearchModal();
510
- wrapCodeBlocksWithCopyButton();
511
- });
@@ -1,167 +0,0 @@
1
- /**
2
- * Client-side shell syntax highlighter for RDoc
3
- * Highlights: $ prompts, commands, options, strings, env vars, comments
4
- */
5
-
6
- (function() {
7
- 'use strict';
8
-
9
- function escapeHtml(text) {
10
- return text
11
- .replace(/&/g, '&amp;')
12
- .replace(/</g, '&lt;')
13
- .replace(/>/g, '&gt;')
14
- .replace(/"/g, '&quot;')
15
- .replace(/'/g, '&#39;');
16
- }
17
-
18
- function wrap(className, text) {
19
- return '<span class="' + className + '">' + escapeHtml(text) + '</span>';
20
- }
21
-
22
- function highlightLine(line) {
23
- if (line.trim() === '') return escapeHtml(line);
24
-
25
- var result = '';
26
- var i = 0;
27
- var len = line.length;
28
-
29
- // Preserve leading whitespace
30
- while (i < len && (line[i] === ' ' || line[i] === '\t')) {
31
- result += escapeHtml(line[i++]);
32
- }
33
-
34
- // Check for $ prompt ($ followed by space or end of line)
35
- if (line[i] === '$' && (line[i + 1] === ' ' || line[i + 1] === undefined)) {
36
- result += wrap('sh-prompt', '$');
37
- i++;
38
- }
39
-
40
- // Check for # comment at start
41
- if (line[i] === '#') {
42
- return result + wrap('sh-comment', line.slice(i));
43
- }
44
-
45
- var seenCommand = false;
46
- var afterSpace = true;
47
-
48
- while (i < len) {
49
- var ch = line[i];
50
-
51
- // Whitespace
52
- if (ch === ' ' || ch === '\t') {
53
- result += escapeHtml(ch);
54
- i++;
55
- afterSpace = true;
56
- continue;
57
- }
58
-
59
- // Comment after whitespace
60
- if (ch === '#' && afterSpace) {
61
- result += wrap('sh-comment', line.slice(i));
62
- break;
63
- }
64
-
65
- // Double-quoted string
66
- if (ch === '"') {
67
- var end = i + 1;
68
- while (end < len && line[end] !== '"') {
69
- if (line[end] === '\\' && end + 1 < len) end += 2;
70
- else end++;
71
- }
72
- if (end < len) end++;
73
- result += wrap('sh-string', line.slice(i, end));
74
- i = end;
75
- afterSpace = false;
76
- continue;
77
- }
78
-
79
- // Single-quoted string
80
- if (ch === "'") {
81
- var end = i + 1;
82
- while (end < len && line[end] !== "'") end++;
83
- if (end < len) end++;
84
- result += wrap('sh-string', line.slice(i, end));
85
- i = end;
86
- afterSpace = false;
87
- continue;
88
- }
89
-
90
- // Environment variable (ALLCAPS=)
91
- if (afterSpace && /[A-Z]/.test(ch)) {
92
- var match = line.slice(i).match(/^[A-Z][A-Z0-9_]*=/);
93
- if (match) {
94
- result += wrap('sh-envvar', match[0]);
95
- i += match[0].length;
96
- // Read unquoted value
97
- var valEnd = i;
98
- while (valEnd < len && line[valEnd] !== ' ' && line[valEnd] !== '\t' && line[valEnd] !== '"' && line[valEnd] !== "'") valEnd++;
99
- if (valEnd > i) {
100
- result += escapeHtml(line.slice(i, valEnd));
101
- i = valEnd;
102
- }
103
- afterSpace = false;
104
- continue;
105
- }
106
- }
107
-
108
- // Option (must be after whitespace)
109
- if (ch === '-' && afterSpace) {
110
- var match = line.slice(i).match(/^--?[a-zA-Z0-9_-]+(=[^"'\s]*)?/);
111
- if (match) {
112
- result += wrap('sh-option', match[0]);
113
- i += match[0].length;
114
- afterSpace = false;
115
- continue;
116
- }
117
- }
118
-
119
- // Command (first word: regular, ./path, ../path, ~/path, /abs/path, @scope/pkg)
120
- if (!seenCommand && afterSpace) {
121
- var isCmd = /[a-zA-Z0-9@~\/]/.test(ch) ||
122
- (ch === '.' && (line[i + 1] === '/' || (line[i + 1] === '.' && line[i + 2] === '/')));
123
- if (isCmd) {
124
- var end = i;
125
- while (end < len && line[end] !== ' ' && line[end] !== '\t') end++;
126
- result += wrap('sh-command', line.slice(i, end));
127
- i = end;
128
- seenCommand = true;
129
- afterSpace = false;
130
- continue;
131
- }
132
- }
133
-
134
- // Everything else
135
- result += escapeHtml(ch);
136
- i++;
137
- afterSpace = false;
138
- }
139
-
140
- return result;
141
- }
142
-
143
- function highlightShell(code) {
144
- return code.split('\n').map(highlightLine).join('\n');
145
- }
146
-
147
- function initHighlighting() {
148
- var selectors = [
149
- 'pre.bash', 'pre.sh', 'pre.shell', 'pre.console',
150
- 'pre[data-language="bash"]', 'pre[data-language="sh"]',
151
- 'pre[data-language="shell"]', 'pre[data-language="console"]'
152
- ];
153
-
154
- var blocks = document.querySelectorAll(selectors.join(', '));
155
- blocks.forEach(function(block) {
156
- if (block.getAttribute('data-highlighted') === 'true') return;
157
- block.innerHTML = highlightShell(block.textContent);
158
- block.setAttribute('data-highlighted', 'true');
159
- });
160
- }
161
-
162
- if (document.readyState === 'loading') {
163
- document.addEventListener('DOMContentLoaded', initHighlighting);
164
- } else {
165
- initHighlighting();
166
- }
167
- })();